ItemBuilder

public class ItemBuilder

Used to quickly make and modify an item in a simple and clean builder solution.

Constructors

Link copied to clipboard
public void ItemBuilder(Material mat)
Constructs an instance of ItemBuilder with a material input
public void ItemBuilder(ItemStack is)
Constructs an instance of ItemBuilder with an itemstack input (Keeps any item metadata added on in the item stack previously)

Functions

Link copied to clipboard
public ItemBuilder amount(int amount)
Set the amount of items that are in this specific itemstack.
Link copied to clipboard
public ItemStack build()
Returns the current itemstack with all the changes made.
Link copied to clipboard
Clear all enchantments on the itemstack
Link copied to clipboard
Clear all lore on the itemstack
Link copied to clipboard
public ItemBuilder durability(int damage)
Set the durability of the itemstack
Link copied to clipboard
public ItemBuilder enchantment(Enchantment enchantment)
Appends an enchantment to the itemstack (unsafely, meaning it'll add it even it's not supposed to be otherwise possible) at the default level of 1
public ItemBuilder enchantment(Enchantment enchantment, int level)
Appends an enchantment to the itemstack (unsafely, meaning it'll add it even it's not supposed to be otherwise possible)
Link copied to clipboard
public ItemBuilder hideAttributes(boolean hide)
Hide/Unhide the attributes of the itemstack
Link copied to clipboard
Sets the localized name (hidden name in the NBT) to the itemstack
Link copied to clipboard
public ItemBuilder lore(String lore)
Appends to the lore of the itemstack
public ItemBuilder lore(Array<String> lore)
Set/Replace the lore of the itemstack using an array
public ItemBuilder lore(List<String> lore)
Sets/replaces the current lore of the itemstack using an array list
Link copied to clipboard
public ItemBuilder name(String name)
Set the name of the itemstack, colour codes are allowed.
Link copied to clipboard
public ItemBuilder potionEffect(PotionType effect)
Add a potion effect to the itemstack Only applies to material type Material.
Link copied to clipboard
public ItemBuilder type(Material material)
Sets the material type of the itemstack
Link copied to clipboard
public ItemBuilder unbreakable(boolean unbreakable)
Sets the itemstack to be unbreakable (or not), infinite durability in a sense.