Package com.plotsquared.bukkit.schematic
Class StateWrapper
java.lang.Object
com.plotsquared.bukkit.schematic.StateWrapper
-
Field Summary
-
Constructor Summary
ConstructorDescriptionStateWrapper
(com.sk89q.jnbt.CompoundTag tag) StateWrapper
(BlockState state) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptiongetId()
com.sk89q.jnbt.CompoundTag
getTag()
Deprecated, for removal: This API element is subject to removal in a future version.in favour of using WorldEdit methods for obtaining NBT, specifically by obtaining aBaseBlock
and then usingBaseBlock.getNbtData()
static String
jsonToColourCode
(String str) boolean
restoreTag
(@NonNull Block block) Restore the TileEntity data to the given blockboolean
restoreTag
(String worldName, int x, int y, int z) Restore the TileEntity data to the given world at the given coordinates.List<com.sk89q.jnbt.CompoundTag>
serializeInventory
(ItemStack[] items) serializeItem
(ItemStack item)
-
Field Details
-
state
-
tag
public com.sk89q.jnbt.CompoundTag tag
-
-
Constructor Details
-
StateWrapper
Deprecated, for removal: This API element is subject to removal in a future version.in favour of using WE methods for obtaining NBT, specifically by obtaining aBaseBlock
and then usingBaseBlock.getNbtData()
-
StateWrapper
public StateWrapper(com.sk89q.jnbt.CompoundTag tag)
-
-
Method Details
-
jsonToColourCode
-
restoreTag
Restore the TileEntity data to the given world at the given coordinates.- Parameters:
worldName
- World namex
- x positiony
- y positionz
- z position- Returns:
- true if successful
-
restoreTag
Restore the TileEntity data to the given block- Parameters:
block
- Block to restore to- Returns:
- true if successful
-
getTag
Deprecated, for removal: This API element is subject to removal in a future version.in favour of using WorldEdit methods for obtaining NBT, specifically by obtaining aBaseBlock
and then usingBaseBlock.getNbtData()
Get a CompoundTag of the contents of a block's inventory (chest, furnace, etc.). -
getId
-
serializeInventory
-
serializeItem
-
BaseBlock
and then usingBaseBlock.getNbtData()