-
Notifications
You must be signed in to change notification settings - Fork 1
ItemBuilder example
Selena Rose Hammond edited this page Aug 22, 2025
·
4 revisions
The ItemBuilder class is used to make creating custom items more streamline. The ItemBuilder class can be serialized and deserialized using the ConfigLoader meaning if you have it stored in a config class it will be saved to the config and loaded correctly.
Simple example usage
public ItemStack test = new ItemBuilder(Material.STONE)
.addCustomNBT("MapperClass", this) // You can store any value using addCustomNBT
.setAmount(5) // Used for setting the ItemStack size
.setTitle("&aCustom Item") // Sets the display name of the item
.setStackable(false) // Assigns it a random UUID to prevent stacking the items
.setGlowing(true) // If there are no enchants it will hide the enchants on the item and add ARROW_DAMAGE enchant
.setLore("Line 1", "line 2") // There are 2 methods of setting the Lore, you can either use a string array or a List
.build(); // Builds the item and returns the ItemStack Please refer to the Docs for all the methods you can use