Item Builder
The ItemBuilder class is used for building ItemStack objects with various properties and customizations. It provides methods for modifying the display name, lore, enchantments, flags, and other attributes of an ItemStack.
Parameters
The material of the ItemStack.
The count (stack size) of the ItemStack. Default is 1.
The DSL (Domain Specific Language) block that can be used to customize the item. Default is an empty block.
Types
Properties
Functions
Adds persistent data to the item.
Adds persistent data to the item stack.
Adds persistent data to the item if the specified condition is true.
Clears the display name of the item.
Clears the display of the item if the given condition is true.
Clear all enchantments on the item.
Clears all enchantments if the specified condition is true.
Clears all flags of the item.
Clears the flags of the ItemBuilder object if the provided condition is true.
Clears the lore of the item.
Clears the lore of the ItemBuilder if the given condition is true.
Creates a deep copy of the current ItemBuilder object.
Checks the given condition and performs the specified operation on the ItemBuilder if the condition is true.
Sets the custom model data for an item.
Change the displayname of the item.
Change the displayname of the item if a certain condition is true.
Adds enchants to the item.
Add flags to the item.
Adds lore to an ItemBuilder object.
Adds lore to the item builder if the given condition is true.
Sets the click event for the item.
Sets the owning player of the skull item.
Sets the owner of the skull to the given name.
Sets the owner of the Player Head item.
Removes persistent data from the item if the condition is true.
Sets the consumable state of the item. This method is not yet supported in PaperMC 1.21.1.
Sets the equippable state of the item in the specified slot. This method is not yet supported in PaperMC 1.21.1.
Sets whether the item should have a glint effect or not.
Sets the owner of the player skull.
Sets the texture of the item to the specified texture.
Retrieves the skin texture of a player from MineSkin API based on the provided MineSkin UUID.
Sets the material of the item stack.
Sets the type of the material in the ItemBuilder, if the given condition is true.