Making a simple item
You will only need a couple of actions to create a simple item.
TailsLib uses data classes to interact with managers, listeners, and other plugins. To create an item we need to create data that will describe the item itself, namely its id for the manager and other components, the name that will be used for players, lore (AKA description) and material.
To create a custom item in TailsLib, you implement the CustomItem
interface by defining the getItemData
method, which returns a CustomItemData
object describing the item. This object includes the item's ID, name, description, and material.
We already know what an ID is, its name and material, but we don't know what a SimpleDescBuilder is. TailsLib uses the IDescBuilder
class to create item descriptions. You can create your own. The SimpleDescBuilder
is a great base class that offers basic functions for writing item descriptions.
Then we should register our item in main class.
Thats all. Use /citem
command to get your item.
Last updated
Was this helpful?