接口 BlockStateMeta
-
方法概要
修饰符和类型方法说明返回这个物品当前附加的BlockState,如果不存在将创建一个新的.boolean
返回这个物品当前是否附加BlockState.void
setBlockState
(@NotNull BlockState blockState) 将BlockState副本附加到物品上(设置这个物品的BlockState).从接口继承的方法 org.bukkit.configuration.serialization.ConfigurationSerializable
serialize
从接口继承的方法 org.bukkit.inventory.meta.ItemMeta
addAttributeModifier, addEnchant, addItemFlags, clone, 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
-
方法详细资料
-
hasBlockState
boolean hasBlockState()返回这个物品当前是否附加BlockState.原文:Returns whether the item has a block state currently attached to it.
- 返回:
- 这个物品当前是否附加BlockState
-
getBlockState
返回这个物品当前附加的BlockState,如果不存在将创建一个新的.这个状态是一个副本,它必须被
setBlockState(org.bukkit.block.BlockState)
重新设置(或其它物品).原文:Returns the currently attached block state for this item or creates a new one if one doesn't exist. The state is a copy, it must be set back (or to another item) with
setBlockState(org.bukkit.block.BlockState)
- 返回:
- 附加的状态或一个新的状态
-
setBlockState
将BlockState副本附加到物品上(设置这个物品的BlockState).原文:Attaches a copy of the passed block state to the item.
- 参数:
blockState
- 要附加给这个方块的BlockState- 抛出:
IllegalArgumentException
- 如果blockState参数为null或对于这个物品是无效的
-