Class ItemFactory
java.lang.Object
nl.mtvehicles.core.infrastructure.utils.ItemFactory
Class for an easy creation of items
-
Constructor Summary
ConstructorDescriptionItemFactory(org.bukkit.inventory.ItemStack itemStack)
ItemFactory(org.bukkit.Material material)
ItemFactory(org.bukkit.Material material, int amount)
ItemFactory(org.bukkit.Material material, int amount, int durability)
-
Method Summary
Modifier and TypeMethodDescriptionaddEnchant(org.bukkit.enchantments.Enchantment enchantment, int level)
addEnchantments(Map<org.bukkit.enchantments.Enchantment,Integer> enchantments)
addLoreLine(String line)
addLoreLine(String line, int pos)
addLoreLines(List<String> line)
addUnsafeEnchantment(org.bukkit.enchantments.Enchantment enchantment, int level)
clone()
getLore()
removeEnchantment(org.bukkit.enchantments.Enchantment enchantment)
removeLoreLine(int index)
removeLoreLine(String line)
setAmount(int amount)
setDurability(int durability)
setDyeColor(org.bukkit.DyeColor color)
setGlowing(boolean glowing)
setLeatherArmorColor(org.bukkit.Color color)
setSkullOwner(String owner)
Deprecated.setSkullOwner(org.bukkit.OfflinePlayer owner)
setType(org.bukkit.Material material)
setUnbreakable(boolean unbreakable)
org.bukkit.inventory.ItemStack
-
Constructor Details
-
ItemFactory
public ItemFactory(org.bukkit.Material material) -
ItemFactory
public ItemFactory(org.bukkit.inventory.ItemStack itemStack) -
ItemFactory
public ItemFactory(org.bukkit.Material material, int amount) -
ItemFactory
public ItemFactory(org.bukkit.Material material, int amount, int durability)
-
-
Method Details
-
clone
-
setDurability
-
setType
-
setName
-
setAmount
-
setUnbreakable
-
getLore
-
setLore
-
removeLore
-
hideAttributes
-
addUnsafeEnchantment
public ItemFactory addUnsafeEnchantment(org.bukkit.enchantments.Enchantment enchantment, int level) -
removeEnchantment
-
addEnchant
-
setGlowing
-
addEnchantGlow
-
addEnchantments
-
setLore
-
addLoreLines
-
setNBT
-
removeLoreLine
-
removeLoreLine
-
addLoreLine
-
addLoreLine
-
setDyeColor
-
setLeatherArmorColor
-
toItemStack
public org.bukkit.inventory.ItemStack toItemStack() -
getSkullOwner
-
setSkullOwner
Deprecated.UsesetSkullOwner(OfflinePlayer)
instead. -
setSkullOwner
-
setSkullOwner(OfflinePlayer)
instead.