Class SignBlock

java.lang.Object
com.sk89q.worldedit.world.block.BaseBlock
com.sk89q.worldedit.blocks.SignBlock
All Implemented Interfaces:
Filter, TileEntityBlock, Pattern, BlockStateHolder<BaseBlock>, NbtValued

public class SignBlock extends BaseBlock
Represents a sign block.
  • Constructor Details

    • SignBlock

      public SignBlock(BlockState blockState, String[] text)
      Construct the sign with text.
      Parameters:
      blockState - The block state
      text - lines of text
  • Method Details

    • getText

      public String[] getText()
      Get the text.
      Returns:
      the text
    • setText

      public void setText(String[] text)
      Set the text.
      Parameters:
      text - the text to set
    • hasNbtData

      public boolean hasNbtData()
      Description copied from interface: NbtValued
      Returns whether the block contains NBT data. NbtValued.getNbtData() must not return null if this method returns true.
      Returns:
      true if there is NBT data
    • getNbtId

      public String getNbtId()
      Description copied from interface: TileEntityBlock
      Return the name of the title entity ID.
      Specified by:
      getNbtId in interface TileEntityBlock
      Overrides:
      getNbtId in class BaseBlock
      Returns:
      tile entity ID, non-null string
    • getNbtData

      public CompoundTag getNbtData()
      Description copied from interface: NbtValued
      Get the object's NBT data (tile entity data). The returned tag, if modified in any way, should be sent to NbtValued.setNbtData(CompoundTag) so that the instance knows of the changes. Making changes without calling NbtValued.setNbtData(CompoundTag) could have unintended consequences.

      NbtValued.hasNbtData() must return true if and only if method does not return null.

      Returns:
      compound tag, or null
    • setNbtData

      public void setNbtData(CompoundTag rootTag)
      Description copied from interface: NbtValued
      Set the object's NBT data (tile entity data).
      Parameters:
      rootTag - NBT data, or null if no data