Interface Sign

All Superinterfaces:
BlockState, Colorable, Metadatable, PersistentDataHolder, TileState
All Known Subinterfaces:
HangingSign

public interface Sign extends TileState, Colorable
Represents a captured state of either a SignPost or a WallSign.
  • Method Details

    • getLines

      Deprecated.
      A sign may have multiple writable sides now. Use getSide(Side) and SignSide.getLines().
      Gets all the lines of text currently on the Side.FRONT of this sign.
      Returns:
      Array of Strings containing each line of text
    • getLine

      Deprecated.
      A sign may have multiple writable sides now. Use getSide(Side) and SignSide.getLine(int).
      Gets the line of text at the specified index.

      For example, getLine(0) will return the first line of text on the Side.FRONT.

      Parameters:
      index - Line number to get the text from, starting at 0
      Returns:
      Text on the given line
      Throws:
      IndexOutOfBoundsException - Thrown when the line does not exist
    • setLine

      @Deprecated void setLine(int index, @NotNull String line) throws IndexOutOfBoundsException
      Deprecated.
      A sign may have multiple writable sides now. Use getSide(Side) and SignSide.setLine(int, String).
      Sets the line of text at the specified index.

      For example, setLine(0, "Line One") will set the first line of text to "Line One".

      Parameters:
      index - Line number to set the text at, starting from 0
      line - New text to set at the specified index
      Throws:
      IndexOutOfBoundsException - If the index is out of the range 0..3
    • isEditable

      boolean isEditable()
      Marks whether this sign can be edited by players.
      This is a special value, which is not persisted. It should only be set if a placed sign is manipulated during the BlockPlaceEvent. Behaviour outside of this event is undefined.
      Returns:
      if this sign is currently editable
    • setEditable

      void setEditable(boolean editable)
      Marks whether this sign can be edited by players.
      This is a special value, which is not persisted. It should only be set if a placed sign is manipulated during the BlockPlaceEvent. Behaviour outside of this event is undefined.
      Parameters:
      editable - if this sign is currently editable
    • isGlowingText

      @Deprecated boolean isGlowingText()
      Deprecated.
      A sign may have multiple writable sides now. Use getSide(Side) and SignSide.isGlowingText().
      Gets whether this sign has glowing text. Only affects the Side.FRONT.
      Returns:
      if this sign has glowing text
    • setGlowingText

      @Deprecated void setGlowingText(boolean glowing)
      Deprecated.
      A sign may have multiple writable sides now. Use getSide(Side) and SignSide.setGlowingText(boolean).
      Sets whether this sign has glowing text. Only affects the Side.FRONT.
      Parameters:
      glowing - if this sign has glowing text
    • getColor

      Deprecated.
      A sign may have multiple writable sides now. Use getSide(Side) and Colorable.getColor().
      Gets the color of this object.
      This may be null to represent the default color of an object, if the object has a special default color (e.g Shulkers).
      Specified by:
      getColor in interface Colorable
      Returns:
      The DyeColor of this object.
    • setColor

      @Deprecated void setColor(@NotNull DyeColor color)
      Deprecated.
      A sign may have multiple writable sides now. Use getSide(Side) and Colorable.setColor(org.bukkit.DyeColor).
      Sets the color of this object to the specified DyeColor.
      This may be null to represent the default color of an object, if the object has a special default color (e.g Shulkers).
      Specified by:
      setColor in interface Colorable
      Parameters:
      color - The color of the object, as a DyeColor.
    • getSide

      @NotNull SignSide getSide(@NotNull Side side)
      Return the side of the sign.
      Parameters:
      side - the side of the sign
      Returns:
      the selected side of the sign