接口 TextDisplay

所有超级接口:
CommandSender, Display, Entity, Metadatable, Nameable, Permissible, PersistentDataHolder, ServerOperator

public interface TextDisplay extends Display
Represents a text display entity.
  • 方法详细资料

    • getText

      Gets the displayed text.
      返回:
      the displayed text.
    • setText

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

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

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

      @Nullable @Nullable Color getBackgroundColor()
      Gets the text background color.
      返回:
      the background color
    • setBackgroundColor

      void setBackgroundColor(@Nullable @Nullable Color color)
      Sets the text background color.
      参数:
      color - new background color
    • getTextOpacity

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

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

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

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

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

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

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

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

      Gets the text alignment for this display.
      返回:
      text alignment
    • setAlignment

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