Interface TextDisplay

All Superinterfaces:
Audience, CommandSender, Display, Entity, HoverEventSource<HoverEvent.ShowEntity>, Metadatable, Nameable, Permissible, PersistentDataHolder, PersistentDataViewHolder, Pointered, ServerOperator, Sound.Emitter

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

    • getText

      Deprecated.
      in favour of text()
      Gets the displayed text.
      Returns:
      the displayed text.
    • setText

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

      Gets the displayed text.
      Returns:
      the displayed text
    • text

      void text(@Nullable Component 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 @Nullable Color getBackgroundColor()
      Gets the text background color.
      Returns:
      the background color
    • setBackgroundColor

      void setBackgroundColor(@Nullable @Nullable Color color)
      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 @NotNull TextDisplay.TextAlignment alignment)
      Sets the text alignment for this display.
      Parameters:
      alignment - new alignment