public interface BlockStateMeta extends ItemMeta
Modifier and Type | Method and Description |
---|---|
@NotNull 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(@NotNull BlockState blockState)
Attaches a copy of the passed block state to the item.
|
addAttributeModifier, addEnchant, addItemFlags, clone, displayName, displayName, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getCanDestroy, getCanPlaceOn, getCustomModelData, getCustomTagContainer, getDestroyableKeys, getDisplayName, getDisplayNameComponent, getEnchantLevel, getEnchants, getItemFlags, getLocalizedName, getLore, getLoreComponents, getPlaceableKeys, hasAttributeModifiers, hasConflictingEnchant, hasCustomModelData, hasDestroyableKeys, hasDisplayName, hasEnchant, hasEnchants, hasItemFlag, hasLocalizedName, hasLore, hasPlaceableKeys, isUnbreakable, lore, lore, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeItemFlags, setAttributeModifiers, setCanDestroy, setCanPlaceOn, setCustomModelData, setDestroyableKeys, setDisplayName, setDisplayNameComponent, setLocalizedName, setLore, setLoreComponents, setPlaceableKeys, setUnbreakable, setVersion
serialize
getPersistentDataContainer
boolean hasBlockState()
@NotNull @NotNull BlockState getBlockState()
setBlockState(org.bukkit.block.BlockState)
void setBlockState(@NotNull @NotNull BlockState blockState)
blockState
- the block state to attach to the block.IllegalArgumentException
- if the blockState is null
or invalid for this item.Copyright © 2021. All rights reserved.