Class ItemBuilder
java.lang.Object
studio.magemonkey.codex.legacy.item.ItemBuilder
- All Implemented Interfaces:
org.bukkit.configuration.serialization.ConfigurationSerializable
public class ItemBuilder
extends Object
implements org.bukkit.configuration.serialization.ConfigurationSerializable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected DataBuilderprotected shortprotected List<org.bukkit.inventory.ItemFlag> protected studio.magemonkey.codex.api.items.ItemTypeprotected intprotected Stringprotected boolean -
Constructor Summary
ConstructorsConstructorDescriptionItemBuilder(Map<String, Object> map) Deprecated.Items should be store using ItemMeta and loaded the same way. -
Method Summary
Modifier and TypeMethodDescriptionamount(int amount) amount(org.bukkit.inventory.ItemStack source) org.bukkit.inventory.ItemStackbuild()data(org.bukkit.inventory.meta.ItemMeta meta) data(DataBuilder dataBuilder) durability(int damage) durability(short damage) durability(org.bukkit.inventory.ItemStack source) enchant(org.bukkit.enchantments.Enchantment enchantment) enchant(org.bukkit.enchantments.Enchantment enchantment, int power) enchant(org.bukkit.inventory.meta.ItemMeta source) flag(org.bukkit.inventory.ItemFlag flag) flag(org.bukkit.inventory.ItemFlag... flags) flag(org.bukkit.inventory.meta.ItemMeta meta) intshortList<org.bukkit.inventory.ItemFlag> getFlags()getLore()studio.magemonkey.codex.api.items.ItemTypegetName()insertLoreLine(int index, String lore) insertLoreLine(int index, String... lore) insertLoreLine(int index, Collection<String> lore) booleanlore(org.bukkit.inventory.meta.ItemMeta source) material(org.bukkit.inventory.ItemStack source) material(org.bukkit.Material material) name(org.bukkit.inventory.ItemStack source) static ItemBuildernewItem(org.bukkit.inventory.ItemStack itemStack) static ItemBuildernewItem(org.bukkit.Material material) newLoreLine(Object lore) newLoreLine(String lore) newLoreLine(String... lore) newLoreLine(Collection<String> lore) removeLoreLine(int lore) removeLoreLine(String lore) removeLoreLine(String... lore) removeLoreLine(Collection<String> lore) reset()setLoreLine(int index, String lore) toString()unbreakable(boolean flag) unbreakable(org.bukkit.inventory.meta.ItemMeta meta) unEnchant(org.bukkit.enchantments.Enchantment enchantment)
-
Field Details
-
material
protected studio.magemonkey.codex.api.items.ItemType material -
amount
protected int amount -
durability
protected short durability -
unbreakable
protected boolean unbreakable -
name
-
lore
-
enchants
-
dataBuilder
-
flags
-
modelData
protected int modelData
-
-
Constructor Details
-
ItemBuilder
Deprecated.Items should be store using ItemMeta and loaded the same way. It is less likely to break that way. -
ItemBuilder
public ItemBuilder()
-
-
Method Details
-
toString
-
unbreakable
-
unbreakable
-
flag
-
clearFlags
-
flag
-
flag
-
material
-
material
-
durability
-
durability
-
durability
-
amount
-
amount
-
name
-
name
-
clearName
-
lore
-
lore
-
newLoreLine
-
newLoreLine
-
newLoreLine
-
newLoreLine
-
insertLoreLine
-
insertLoreLine
-
insertLoreLine
-
removeLoreLine
-
removeLoreLine
-
removeLoreLine
-
removeLoreLine
-
setLoreLine
-
clearLore
-
enchant
-
enchant
-
enchant
-
enchant
-
unEnchant
-
clearEnchants
-
data
-
data
-
build
public org.bukkit.inventory.ItemStack build() -
reset
-
serialize
- Specified by:
serializein interfaceorg.bukkit.configuration.serialization.ConfigurationSerializable
-
newItem
-
newItem
-
getMaterial
public studio.magemonkey.codex.api.items.ItemType getMaterial() -
getAmount
public int getAmount() -
getDurability
public short getDurability() -
isUnbreakable
public boolean isUnbreakable() -
getName
-
getLore
-
getEnchants
-
getDataBuilder
-
getFlags
-