Interface TextDisplay

All Superinterfaces:
CommandSender, Display, Entity, Metadatable, Nameable, Permissible, PersistentDataHolder, ServerOperator

public interface TextDisplay extends Display
Represents a text display entity.
  • Method Details

    • getText

      @Nullable String getText()
      Gets the displayed text.
      Returns:
      the displayed text.
    • setText

      void setText(@Nullable String text)
      Sets the displayed text.
      Parameters:
      text - the new text
    • getLineWidth

      int getLineWidth()
      Gets the maximum line width before wrapping.
      Returns:
      the line width
    • setLineWidth

      void setLineWidth(int width)
      Sets the maximum line width before wrapping.
      Parameters:
      width - new line width
    • getBackgroundColor

      @Nullable @Deprecated Color getBackgroundColor()
      Deprecated.
      API subject to change
      Gets the text background color.
      Returns:
      the background color
    • setBackgroundColor

      @Deprecated void setBackgroundColor(@Nullable Color color)
      Deprecated.
      API subject to change
      Sets the text background color.
      Parameters:
      color - new background color
    • getTextOpacity

      byte getTextOpacity()
      Gets the text opacity.
      Returns:
      opacity or -1 if not set
    • setTextOpacity

      void setTextOpacity(byte opacity)
      Sets the text opacity.
      Parameters:
      opacity - new opacity or -1 if default
    • isShadowed

      boolean isShadowed()
      Gets if the text is shadowed.
      Returns:
      shadow status
    • setShadowed

      void setShadowed(boolean shadow)
      Sets if the text is shadowed.
      Parameters:
      shadow - if shadowed
    • isSeeThrough

      boolean isSeeThrough()
      Gets if the text is see through.
      Returns:
      see through status
    • setSeeThrough

      void setSeeThrough(boolean seeThrough)
      Sets if the text is see through.
      Parameters:
      seeThrough - if see through
    • isDefaultBackground

      boolean isDefaultBackground()
      Gets if the text has its default background.
      Returns:
      default background
    • setDefaultBackground

      void setDefaultBackground(boolean defaultBackground)
      Sets if the text has its default background.
      Parameters:
      defaultBackground - if default
    • getAlignment

      Gets the text alignment for this display.
      Returns:
      text alignment
    • setAlignment

      void setAlignment(@NotNull TextDisplay.TextAlignment alignment)
      Sets the text alignment for this display.
      Parameters:
      alignment - new alignment