接口 Damageable
代表有耐久度、可损耗的物品.
-
方法概要
修饰符和类型方法说明clone()
int
获取物品的耐久度.int
Gets the maximum amount of damage.boolean
检测此物品是否有耐久度.boolean
Checks to see if this item has a maximum amount of damage.void
setDamage
(int damage) 设置物品的耐久度.void
setMaxDamage
(@Nullable Integer maxDamage) Sets the maximum amount of damage.从接口继承的方法 org.bukkit.configuration.serialization.ConfigurationSerializable
serialize
从接口继承的方法 org.bukkit.inventory.meta.ItemMeta
addAttributeModifier, addEnchant, addItemFlags, getAsComponentString, getAsString, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getCustomModelData, getCustomTagContainer, getDisplayName, getEnchantLevel, getEnchantmentGlintOverride, getEnchants, getFood, getItemFlags, getItemName, getJukeboxPlayable, getLocalizedName, getLore, getMaxStackSize, getRarity, getTool, hasAttributeModifiers, hasConflictingEnchant, hasCustomModelData, hasDisplayName, hasEnchant, hasEnchantmentGlintOverride, hasEnchants, hasFood, hasItemFlag, hasItemName, hasJukeboxPlayable, hasLocalizedName, hasLore, hasMaxStackSize, hasRarity, hasTool, isFireResistant, isHideTooltip, isUnbreakable, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeEnchantments, removeItemFlags, setAttributeModifiers, setCustomModelData, setDisplayName, setEnchantmentGlintOverride, setFireResistant, setFood, setHideTooltip, setItemName, setJukeboxPlayable, setLocalizedName, setLore, setMaxStackSize, setRarity, setTool, setUnbreakable, setVersion
从接口继承的方法 org.bukkit.persistence.PersistentDataHolder
getPersistentDataContainer
-
方法详细资料
-
hasDamage
boolean hasDamage()检测此物品是否有耐久度.原文: Checks to see if this item has damage
- 返回:
- 此物品是否有耐久度
-
getDamage
int getDamage()获取物品的耐久度.原文: Gets the damage
- 返回:
- 耐久度
-
setDamage
void setDamage(int damage) 设置物品的耐久度.原文: Sets the damage
- 参数:
damage
- 物品耐久度
-
hasMaxDamage
boolean hasMaxDamage()Checks to see if this item has a maximum amount of damage.- 返回:
- true if this has maximum amount of damage
-
getMaxDamage
int getMaxDamage()Gets the maximum amount of damage. Plugins should checkhasMaxDamage()
before calling this method.- 返回:
- the maximum amount of damage
-
setMaxDamage
Sets the maximum amount of damage.- 参数:
maxDamage
- maximum amount of damage
-
clone
-