public final class ItemBuilder extends Object
| Constructor and Description |
|---|
ItemBuilder(org.bukkit.inventory.ItemStack itemStack)
Constructor of the item builder
|
ItemBuilder(org.bukkit.Material material)
Secondary constructor with only Material
|
| Modifier and Type | Method and Description |
|---|---|
ItemBuilder |
addEnchantment(@NotNull org.bukkit.enchantments.Enchantment enchantment)
Add enchantments to an item
|
ItemBuilder |
addEnchantment(@NotNull org.bukkit.enchantments.Enchantment enchantment,
int level)
Add enchantments to an item
|
ItemBuilder |
addEnchantment(@NotNull org.bukkit.enchantments.Enchantment enchantment,
int level,
boolean ignoreLevelRestriction)
Add enchantments to an item
|
ItemBuilder |
addItemFlags(org.bukkit.inventory.ItemFlag... flags)
Add a custom item flag to the item
|
org.bukkit.inventory.ItemStack |
build()
Builds the item into ItemStack
|
ItemBuilder |
glow(boolean glow)
Makes the Item glow
|
ItemBuilder |
removeEnchantment(@NotNull org.bukkit.enchantments.Enchantment enchantment)
Removes a certain enchantment from the item
|
ItemBuilder |
setAmount(int amount)
Sets the amount of items
|
ItemBuilder |
setLore(@NotNull List<String> lore)
Set the lore lines of an item
|
ItemBuilder |
setLore(String... lore)
Set the lore lines of an item
|
ItemBuilder |
setName(@NotNull String name)
Set display name of the item
|
ItemBuilder |
setSkullOwner(@NotNull org.bukkit.OfflinePlayer player)
Sets skull owner via bukkit methods
|
ItemBuilder |
setSkullTexture(@NotNull String texture)
Sets the skull texture
|
ItemBuilder |
setUnbreakable(boolean unbreakable)
Sets the item as unbreakable
|
public ItemBuilder(org.bukkit.inventory.ItemStack itemStack)
itemStack - The ItemStack of the itempublic ItemBuilder(org.bukkit.Material material)
material - The material of the ItemStackpublic org.bukkit.inventory.ItemStack build()
public ItemBuilder setName(@NotNull @NotNull String name)
name - the display name of the itempublic ItemBuilder setAmount(int amount)
amount - the amount of itemspublic ItemBuilder setLore(@NotNull String... lore)
lore - the lore lines to setpublic ItemBuilder setLore(@NotNull @NotNull List<String> lore)
lore - the lore lines to setpublic ItemBuilder addEnchantment(@NotNull @NotNull org.bukkit.enchantments.Enchantment enchantment, int level, boolean ignoreLevelRestriction)
enchantment - the enchantment to addlevel - the level of the enchantmentignoreLevelRestriction - If should or not ignore itpublic ItemBuilder addEnchantment(@NotNull @NotNull org.bukkit.enchantments.Enchantment enchantment, int level)
enchantment - the enchantment to addlevel - the level of the enchantmentpublic ItemBuilder addEnchantment(@NotNull @NotNull org.bukkit.enchantments.Enchantment enchantment)
enchantment - the enchantment to addpublic ItemBuilder removeEnchantment(@NotNull @NotNull org.bukkit.enchantments.Enchantment enchantment)
enchantment - The enchantment to removepublic ItemBuilder addItemFlags(@NotNull org.bukkit.inventory.ItemFlag... flags)
flags - the flags to addpublic ItemBuilder setUnbreakable(boolean unbreakable)
unbreakable - If should or not be unbreakablepublic ItemBuilder glow(boolean glow)
glow - Should the item glowpublic ItemBuilder setSkullTexture(@NotNull @NotNull String texture)
texture - The base64 texturepublic ItemBuilder setSkullOwner(@NotNull @NotNull org.bukkit.OfflinePlayer player)
player - OfflinePlayer to set skull ofCopyright © 2020. All rights reserved.