Package com.hazebyte.crate.api.util
Class ItemBuilder
- java.lang.Object
-
- com.hazebyte.crate.api.util.ItemBuilder
-
public class ItemBuilder extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ItemBuilder.DataType
-
Constructor Summary
Constructors Constructor Description ItemBuilder(org.bukkit.inventory.ItemStack itemStack)
ItemBuilder(org.bukkit.Material type)
ItemBuilder(org.bukkit.Material type, int amount)
ItemBuilder(org.bukkit.Material type, int amount, short durability)
ItemBuilder(org.bukkit.Material type, int amount, short durability, String displayName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ItemBuilder
amount(int amount)
ItemBuilder
append(String... lines)
ItemBuilder
append(List<String> lines)
org.bukkit.inventory.ItemStack
asItemStack()
static ItemBuilder
clone(org.bukkit.inventory.ItemStack itemStack)
ItemBuilder
displayName(String displayName)
ItemBuilder
durability(short durability)
ItemBuilder
enchant(org.bukkit.enchantments.Enchantment enchantment, int level)
ItemBuilder
enchants(Map<org.bukkit.enchantments.Enchantment,Integer> enchants)
ItemBuilder
flag(org.bukkit.inventory.ItemFlag flag)
ItemBuilder
flags(org.bukkit.inventory.ItemFlag... flags)
Integer
getCustomModelData()
Boolean
hasCustomModelData()
ItemBuilder
hideAll(boolean hide)
ItemBuilder
lore(String... lines)
ItemBuilder
lore(List<String> lore)
static ItemBuilder
of(org.bukkit.inventory.ItemStack itemStack)
ItemBuilder
removeEnchants()
ItemBuilder
setCustomModelData(Integer data)
ItemBuilder
setGlowing(boolean glowing)
ItemBuilder
type(org.bukkit.Material type)
ItemBuilder
unbreakable(boolean unbreakable)
ItemBuilder
unsafeEnchant(org.bukkit.enchantments.Enchantment enchantment, int level)
ItemBuilder
unsafeEnchants(Map<org.bukkit.enchantments.Enchantment,Integer> enchants)
-
-
-
Constructor Detail
-
ItemBuilder
public ItemBuilder(org.bukkit.Material type)
-
ItemBuilder
public ItemBuilder(org.bukkit.Material type, int amount)
-
ItemBuilder
public ItemBuilder(org.bukkit.Material type, int amount, short durability)
-
ItemBuilder
public ItemBuilder(org.bukkit.Material type, int amount, short durability, String displayName)
-
ItemBuilder
public ItemBuilder(org.bukkit.inventory.ItemStack itemStack)
-
-
Method Detail
-
clone
public static ItemBuilder clone(org.bukkit.inventory.ItemStack itemStack)
-
of
public static ItemBuilder of(org.bukkit.inventory.ItemStack itemStack)
-
type
public ItemBuilder type(org.bukkit.Material type)
-
amount
public ItemBuilder amount(int amount)
-
durability
public ItemBuilder durability(short durability)
-
displayName
public ItemBuilder displayName(String displayName)
-
lore
public ItemBuilder lore(String... lines)
-
lore
public ItemBuilder lore(List<String> lore)
-
append
public ItemBuilder append(String... lines)
-
append
public ItemBuilder append(List<String> lines)
-
enchants
public ItemBuilder enchants(Map<org.bukkit.enchantments.Enchantment,Integer> enchants)
-
unsafeEnchants
public ItemBuilder unsafeEnchants(Map<org.bukkit.enchantments.Enchantment,Integer> enchants)
-
enchant
public ItemBuilder enchant(org.bukkit.enchantments.Enchantment enchantment, int level)
-
unsafeEnchant
public ItemBuilder unsafeEnchant(org.bukkit.enchantments.Enchantment enchantment, int level)
-
removeEnchants
public ItemBuilder removeEnchants()
-
flags
public ItemBuilder flags(org.bukkit.inventory.ItemFlag... flags)
-
flag
public ItemBuilder flag(org.bukkit.inventory.ItemFlag flag)
-
unbreakable
public ItemBuilder unbreakable(boolean unbreakable)
-
hideAll
public ItemBuilder hideAll(boolean hide)
-
getCustomModelData
public Integer getCustomModelData()
-
setCustomModelData
public ItemBuilder setCustomModelData(Integer data)
-
hasCustomModelData
public Boolean hasCustomModelData()
-
setGlowing
public ItemBuilder setGlowing(boolean glowing)
-
asItemStack
public org.bukkit.inventory.ItemStack asItemStack()
-
-