Class StateWrapper

java.lang.Object
com.plotsquared.bukkit.schematic.StateWrapper

public class StateWrapper extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
    com.sk89q.jnbt.CompoundTag
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    StateWrapper(com.sk89q.jnbt.CompoundTag tag)
     
    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 a BaseBlock and then using BaseBlock.getNbtData()
  • Method Summary

    Modifier and Type
    Method
    Description
     
    com.sk89q.jnbt.CompoundTag
    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 a BaseBlock and then using BaseBlock.getNbtData()
    static String
     
    boolean
    Restore the TileEntity data to the given block
    boolean
    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>
     
    Map<String,com.sk89q.jnbt.Tag>
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • state

      public BlockState state
    • tag

      public com.sk89q.jnbt.CompoundTag tag
  • Constructor Details

    • StateWrapper

      @Deprecated(forRemoval=true, since="6.9.0") public StateWrapper(BlockState state)
      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 a BaseBlock and then using BaseBlock.getNbtData()
    • StateWrapper

      public StateWrapper(com.sk89q.jnbt.CompoundTag tag)
  • Method Details

    • jsonToColourCode

      public static String jsonToColourCode(String str)
    • restoreTag

      public boolean restoreTag(String worldName, int x, int y, int z)
      Restore the TileEntity data to the given world at the given coordinates.
      Parameters:
      worldName - World name
      x - x position
      y - y position
      z - z position
      Returns:
      true if successful
    • restoreTag

      public boolean restoreTag(@NonNull Block block)
      Restore the TileEntity data to the given block
      Parameters:
      block - Block to restore to
      Returns:
      true if successful
    • getTag

      @Deprecated(forRemoval=true, since="6.9.0") public 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 a BaseBlock and then using BaseBlock.getNbtData()
      Get a CompoundTag of the contents of a block's inventory (chest, furnace, etc.).
    • getId

      public String getId()
    • serializeInventory

      public List<com.sk89q.jnbt.CompoundTag> serializeInventory(ItemStack[] items)
    • serializeItem

      public Map<String,com.sk89q.jnbt.Tag> serializeItem(ItemStack item)