Language

TailsLib

TailsLib

ModrinthSpigotMC

A library for creating your own items, blocks, effects, etc. for Paper servers without mods or data packs.

2 downloads updated 16d ago
latest v1.0.0 Modrinth
Paper Spigot 1.21.1 – 1.21.1 EquipmentLibraryUtility

TailsLib

This project still under heavy development!

TailsLib is a library that allows developers to create custom items and blocks through code with almost no effort.

How to use it?

Java

Create new java file and implement CustomItem.

MyItem.java

public class TestItem implements CustomItem {

    // ID of this item.
    @Override
    public String id() {
        return "myitem";
    }

    // Basic builder for this item.
    @Override
    public CustomItemBuilder createBuilder() {
        return new CustomItemBuilder(Material.DIAMOND) // Material of this item in-game
            .name("My own item.") // Display name
            .loreString(List.of("Hello!")); // Adding lore strings. (.lore for Component#text)
    }

    // Handling left click.
    @Override
    public void leftClick(CustomItemRuntime item, PlayerInteractEvent event) {
        event.getPlayer().sendMessage("Heya, you left clicked me!"); // Sending message
    }
}

Register your item in your main class.

public class Main extends JavaPlugin {
    
    @Override
    public void onEnable() {
        ...
        CustomItemManager.getManager().register(new MyItem());
        ...
    }

    @Override
    public void onDisable() {
        // Plugin shutdown logic
    }

}

Enjoy!

Installation

Check docs for more info and versions.

Gradle

repositories {
    ...
    maven("https://repo.papermc.io/repository/maven-public/")
    ...
}

dependencies {
    ...
    compileOnly("ru.thisistails:TailsLib:VERSION")
    ...
}

Versions

Beta
1.0.0
paper, spigot · 1.21.1 · 16d ago
2

Comments 0

No comments yet. Be the first to share your thoughts.

Download TailsLib

SpigotMC

Files are served directly from the original source. Modgrid does not host or modify them.