接口 BlockStateMeta
- 所有超级接口:
Cloneable
,ConfigurationSerializable
,ItemMeta
-
方法概要
修饰符和类型方法说明返回这个物品当前附加的BlockState,如果不存在将创建一个新的.boolean
返回这个物品当前是否附加BlockState.void
setBlockState
(BlockState blockState) 将BlockState副本附加到物品上(设置这个物品的BlockState).从接口继承的方法 org.bukkit.configuration.serialization.ConfigurationSerializable
serialize
从接口继承的方法 org.bukkit.inventory.meta.ItemMeta
addEnchant, addItemFlags, clone, getDisplayName, getEnchantLevel, getEnchants, getItemFlags, getLocalizedName, getLore, hasConflictingEnchant, hasDisplayName, hasEnchant, hasEnchants, hasItemFlag, hasLocalizedName, hasLore, isUnbreakable, removeEnchant, removeItemFlags, setDisplayName, setLocalizedName, setLore, setUnbreakable
-
方法详细资料
-
hasBlockState
boolean hasBlockState()返回这个物品当前是否附加BlockState.原文:Returns whether the item has a block state currently attached to it.
- 返回:
- 这个物品当前是否附加BlockState
-
getBlockState
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或对于这个物品是无效的
-