public interface BlockDataMeta extends ItemMeta
ItemMeta.Spigot
Modifier and Type | Method and Description |
---|---|
BlockData |
getBlockData(Material material)
Returns the currently attached block data for this item or creates a new
one if one doesn't exist.
|
boolean |
hasBlockData()
Returns whether the item has block data currently attached to it.
|
void |
setBlockData(BlockData blockData)
Attaches a copy of the passed block data to the item.
|
addAttributeModifier, addEnchant, addItemFlags, clone, getAttributeModifiers, getAttributeModifiers, getAttributeModifiers, getCanDestroy, getCanPlaceOn, getCustomModelData, getCustomTagContainer, getDestroyableKeys, getDisplayName, getEnchantLevel, getEnchants, getItemFlags, getLocalizedName, getLore, getPlaceableKeys, hasAttributeModifiers, hasConflictingEnchant, hasCustomModelData, hasDestroyableKeys, hasDisplayName, hasEnchant, hasEnchants, hasItemFlag, hasLocalizedName, hasLore, hasPlaceableKeys, isUnbreakable, removeAttributeModifier, removeAttributeModifier, removeAttributeModifier, removeEnchant, removeItemFlags, setAttributeModifiers, setCanDestroy, setCanPlaceOn, setCustomModelData, setDestroyableKeys, setDisplayName, setLocalizedName, setLore, setPlaceableKeys, setUnbreakable, setVersion, spigot
serialize
getPersistentDataContainer
boolean hasBlockData()
@NotNull BlockData getBlockData(@NotNull Material material)
setBlockData(org.bukkit.block.data.BlockData)
material
- the material we wish to get this data in the context ofvoid setBlockData(@NotNull BlockData blockData)
blockData
- the block data to attach to the block.IllegalArgumentException
- if the blockData is null or invalid for
this item.Copyright © 2022. All rights reserved.