类 ItemBuilder
java.lang.Object
cn.afternode.commons.bukkit.gui.ItemBuilder
Tool for create an item
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明Collection<org.bukkit.attribute.AttributeModifier>attribute(org.bukkit.attribute.Attribute attribute) Get modifiers of an attributeattribute(org.bukkit.attribute.Attribute attribute, org.bukkit.attribute.AttributeModifier... modifiers) Add attribute modifiercom.google.common.collect.Multimap<org.bukkit.attribute.Attribute,org.bukkit.attribute.AttributeModifier> Get existing attribute modifiers from this itemorg.bukkit.inventory.ItemStackbuild()Convert to itemClear existing attribute modifiersClear existing enchantmentsClear existing flagsenchant(org.bukkit.enchantments.Enchantment enchantment) Get enchantment level of this itemenchant(org.bukkit.enchantments.Enchantment enchantment, int level) Set enchantment level for this itemflag(org.bukkit.inventory.ItemFlag... flags) Add flags for this itemSet<org.bukkit.inventory.ItemFlag>flags()Get flags from this itemlore(MessageBuilder... lore) Add lore to this itemlore(net.kyori.adventure.text.Component... lore) Add lore to this itemlore(net.kyori.adventure.text.ComponentLike... lore) Add lore to this itemorg.bukkit.Materialmaterial()Get material of this itemmaterial(org.bukkit.Material material) Set material for this itemmodel()Get current custom model dataSet custom model data for this item, null to clearnet.kyori.adventure.text.Componentname()Get name of this itemname(MessageBuilder builder) Set name of this item from buildername(net.kyori.adventure.text.Component name) Set name of this itemname(net.kyori.adventure.text.ComponentLike name) Set name of this itemnewLore()Reset lore of this itemremoveEnchant(org.bukkit.enchantments.Enchantment enchantment) Remove enchantment from this itemremoveFlags(org.bukkit.inventory.ItemFlag... flags) Remove flags from this itembooleanGet unbreakable tag valueunbreakable(boolean unbreakable) Set unbreakable tag
-
构造器详细资料
-
ItemBuilder
public ItemBuilder(org.bukkit.Material material) Primary constructor- 参数:
material-material
-
-
方法详细资料
-
material
Set material for this item- 参数:
material- material- 返回:
- this
-
material
public org.bukkit.Material material()Get material of this item- 返回:
- material
-
name
Set name of this item- 参数:
name- Name or null as default- 返回:
- this
- 另请参阅:
-
ItemMeta.displayName(Component)
-
name
Set name of this item- 参数:
name- Name or null as default- 返回:
- this
-
name
Set name of this item from builder- 参数:
builder- builder- 返回:
- this
-
name
public net.kyori.adventure.text.Component name()Get name of this item- 返回:
- name
-
lore
Add lore to this item- 参数:
lore- lore- 返回:
- this
-
lore
Add lore to this item- 参数:
lore- lore- 返回:
- this
-
lore
Add lore to this item- 参数:
lore- lore- 返回:
- this
-
newLore
Reset lore of this item- 返回:
- this
-
model
Set custom model data for this item, null to clear- 参数:
model- model- 返回:
- this
- 另请参阅:
-
ItemMeta.setCustomModelData(Integer)
-
model
Get current custom model data- 返回:
- data
-
enchant
Set enchantment level for this item- 参数:
enchantment- enchantmentlevel- level- 返回:
- this
- 另请参阅:
-
ItemMeta.addEnchant(Enchantment, int, boolean)
-
removeEnchant
Remove enchantment from this item- 参数:
enchantment- enchantment- 返回:
- this
-
enchant
Get enchantment level of this item- 参数:
enchantment- enchantment- 返回:
- level
-
clearEnchantments
Clear existing enchantments- 返回:
- this
-
flag
Add flags for this item- 参数:
flags- flags- 返回:
- this
-
removeFlags
Remove flags from this item- 参数:
flags- flags- 返回:
- this
-
flags
Get flags from this item- 返回:
- flags
-
clearFlags
Clear existing flags- 返回:
- this
-
unbreakable
Set unbreakable tag- 参数:
unbreakable- value- 返回:
- this
- 另请参阅:
-
ItemMeta.setUnbreakable(boolean)
-
unbreakable
public boolean unbreakable()Get unbreakable tag value- 返回:
- value
-
attribute
public ItemBuilder attribute(org.bukkit.attribute.Attribute attribute, org.bukkit.attribute.AttributeModifier... modifiers) Add attribute modifier- 参数:
attribute- attributemodifiers- modifiers- 返回:
- this
- 另请参阅:
-
ItemMeta.addAttributeModifier(Attribute, AttributeModifier)
-
attribute
public Collection<org.bukkit.attribute.AttributeModifier> attribute(org.bukkit.attribute.Attribute attribute) Get modifiers of an attribute- 参数:
attribute- attribute- 返回:
- modifiers
-
attributes
public com.google.common.collect.Multimap<org.bukkit.attribute.Attribute,org.bukkit.attribute.AttributeModifier> attributes()Get existing attribute modifiers from this item- 返回:
- modifiers
-
clearAttributes
Clear existing attribute modifiers- 返回:
- this
-
build
public org.bukkit.inventory.ItemStack build()Convert to item- 返回:
- result item
-