ItemBuilder

class ItemBuilder(material: Material)(source)

This class is used to easily create heavily customized ItemStacks

Parameters

material

The material of the item

Constructors

Link copied to clipboard
constructor(material: Material)

Functions

Link copied to clipboard
fun amount(amount: Int): ItemBuilder
Link copied to clipboard
fun attributeModifiers(attributeModifiers: Map<Attribute, AttributeModifier>): ItemBuilder
Link copied to clipboard
fun build(): ItemStack

Builds the item with the specified properties

Link copied to clipboard
fun customModelData(customModelData: Int?): ItemBuilder
Link copied to clipboard
fun displayName(displayName: Component?): ItemBuilder
Link copied to clipboard
fun enchantmentGlintOverride(enchantmentGlintOverride: Boolean?): ItemBuilder
Link copied to clipboard
fun enchantments(enchantments: Map<Enchantment, Int>): ItemBuilder
Link copied to clipboard
fun itemFlags(itemFlags: List<ItemFlag>): ItemBuilder
Link copied to clipboard
fun lore(lore: List<Component>): ItemBuilder
Link copied to clipboard
fun maxStackSize(maxStackSize: Int?): ItemBuilder
Link copied to clipboard
fun owningPlayer(playerProfile: PlayerProfile): ItemBuilder
Link copied to clipboard
fun rarity(rarity: ItemRarity?): ItemBuilder
Link copied to clipboard
fun unbreakable(unbreakable: Boolean): ItemBuilder