ItemBuilder

open class ItemBuilder(source)

Created by Glare Date: 4/8/2019 Time: 2:22 PM

Constructors

Link copied to clipboard
open fun ItemBuilder(@NotNull item: @NotNull ItemStack)
Constructor to build an item
Link copied to clipboard
open fun ItemBuilder(@NotNull material: @NotNull Material)
Constructor to make an item

Functions

Link copied to clipboard
@NotNull
open fun addEnchantment(@NotNull enchantment: @NotNull Enchantment, level: Int): @NotNull ItemBuilder
Add enachants to an item
Link copied to clipboard
@NotNull
open fun addItemFlags(@NotNull flags: Array<@NotNull ItemFlag>): @NotNull ItemBuilder
Add a custom item flag to itembuilder
Link copied to clipboard
@NotNull
open fun <T : ItemMeta?> applyCustomMeta(@NotNull type: @NotNull Class<T>, @NotNull applier: @NotNull Consumer<T>): @NotNull ItemBuilder
Apply custom meta to an item
Link copied to clipboard
@NotNull
@Contract(pure = true)
open fun build(): @NotNull ItemStack
Build an item
Link copied to clipboard
@NotNull
open fun setAmount(amount: Int): @NotNull ItemBuilder
Set the amount of an item
Link copied to clipboard
@NotNull
open fun setLore(@NotNull lore: Array<@NotNull String>): @NotNull ItemBuilder
@NotNull
open fun setLore(@NotNull lore: @NotNull List<String>): @NotNull ItemBuilder
Set the lore of an item
Link copied to clipboard
@NotNull
open fun setName(@NotNull name: @NotNull String): @NotNull ItemBuilder
Set the name of an item
Link copied to clipboard
@NotNull
open fun setUnbreakable(unbreakable: Boolean): @NotNull ItemBuilder
Sets an itembuilder item to be unbreakable