Cloneable
, ConfigurationSerializable
, ItemMeta
public interface BlockStateMeta extends ItemMeta
ItemMeta.Spigot
Modifier and Type | Method | Description |
---|---|---|
BlockState |
getBlockState() |
Returns the currently attached block state for this
item or creates a new one if one doesn't exist.
|
boolean |
hasBlockState() |
Returns whether the item has a block state currently
attached to it.
|
void |
setBlockState(BlockState blockState) |
Attaches a copy of the passed block state to the item.
|
serialize
addAttributeModifier, addEnchant, addItemFlags, clone, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getCanDestroy, getCanPlaceOn, getCustomTagContainer, getDestroyableKeys, getDisplayName, getEnchantLevel, getEnchants, getItemFlags, getLocalizedName, getLore, getPlaceableKeys, hasAttributeModifiers, hasConflictingEnchant, hasDestroyableKeys, hasDisplayName, hasEnchant, hasEnchants, hasItemFlag, hasLocalizedName, hasLore, hasPlaceableKeys, isUnbreakable, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeItemFlags, setAttributeModifiers, setCanDestroy, setCanPlaceOn, setDestroyableKeys, setDisplayName, setLocalizedName, setLore, setPlaceableKeys, setUnbreakable, spigot
boolean hasBlockState()
@NotNull BlockState getBlockState()
setBlockState(org.bukkit.block.BlockState)
void setBlockState(@NotNull BlockState blockState)
blockState
- the block state to attach to the block.IllegalArgumentException
- if the blockState is null
or invalid for this item.Copyright © 2020. All rights reserved.