Class BlockEntitySign

All Implemented Interfaces:
Cloneable

public class BlockEntitySign extends BlockEntitySpawnable
Author:
MagicDroidX (Nukkit Project)
  • Constructor Details

  • Method Details

    • loadNBT

      @Since("1.19.60-r1") public void loadNBT()
      Description copied from class: BlockEntity
      从方块实体的namedtag中读取数据
      Overrides:
      loadNBT in class BlockEntity
    • saveNBT

      public void saveNBT()
      Description copied from class: BlockEntity
      存储方块实体数据到namedtag
      Overrides:
      saveNBT in class BlockEntity
    • isBlockEntityValid

      public boolean isBlockEntityValid()
      Specified by:
      isBlockEntityValid in class BlockEntity
    • setText

      public boolean setText(String... lines)
    • getText

      public String[] getText()
    • getColor

      public BlockColor getColor()
    • setColor

      public void setColor(BlockColor color)
    • isGlowing

      public boolean isGlowing()
    • setGlowing

      public void setGlowing(boolean glowing)
    • updateCompoundTag

      public boolean updateCompoundTag(CompoundTag nbt, Player player)
      Description copied from class: BlockEntitySpawnable
      Called when a player updates a block entity's NBT data for example when writing on a sign.
      Overrides:
      updateCompoundTag in class BlockEntitySpawnable
      Parameters:
      nbt - tag
      player - player
      Returns:
      bool indication of success, will respawn the tile to the player if false.
    • getSpawnCompound

      public CompoundTag getSpawnCompound()
      Overrides:
      getSpawnCompound in class BlockEntitySpawnable