Interface SignSide

All Superinterfaces:
Colorable

public interface SignSide extends Colorable
Represents a side of a sign.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull String
    getLine(int index)
    Deprecated.
    in favour of line(int)
    @NotNull String[]
    Deprecated.
    in favour of lines()
    boolean
    Gets whether this side of the sign has glowing text.
    net.kyori.adventure.text.Component
    line(int index)
    Gets the line of text at the specified index.
    void
    line(int index, @NotNull net.kyori.adventure.text.Component line)
    Sets the line of text at the specified index.
    List<net.kyori.adventure.text.Component>
    Gets all the lines of text currently on the sign.
    void
    setGlowingText(boolean glowing)
    Sets whether this side of the sign has glowing text.
    void
    setLine(int index, @NotNull String line)

    Methods inherited from interface org.bukkit.material.Colorable

    getColor, setColor
  • Method Details

    • lines

      @NotNull List<net.kyori.adventure.text.Component> lines()
      Gets all the lines of text currently on the sign.
      Returns:
      List of components containing each line of text
    • line

      @NotNull net.kyori.adventure.text.Component line(int index) throws IndexOutOfBoundsException
      Gets the line of text at the specified index.

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

      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
    • line

      void line(int index, @NotNull net.kyori.adventure.text.Component line) throws IndexOutOfBoundsException
      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
    • getLines

      @NotNull @Deprecated @NotNull String[] getLines()
      Deprecated.
      in favour of lines()
      Gets all the lines of text currently on this side of the sign.
      Returns:
      Array of Strings containing each line of text
    • getLine

      @NotNull @Deprecated @NotNull String getLine(int index) throws IndexOutOfBoundsException
      Deprecated.
      in favour of line(int)
      Gets the line of text at the specified index on this side of the sign.

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

      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 @NotNull String line) throws IndexOutOfBoundsException
      Sets the line of text at the specified index on this side of the sign.

      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
    • isGlowingText

      boolean isGlowingText()
      Gets whether this side of the sign has glowing text.
      Returns:
      if this side of the sign has glowing text
    • setGlowingText

      void setGlowingText(boolean glowing)
      Sets whether this side of the sign has glowing text.
      Parameters:
      glowing - if this side of the sign has glowing text