Interface TextDisplay

All Superinterfaces:
CopyableDataHolder, DataHolder, DataHolder.Mutable, DataSerializable, DisplayEntity, Entity, EntityProjectileSource, HoverEventSource<HoverEvent.ShowEntity>, Identifiable, Locatable, ProjectileSource, RandomProvider, SerializableDataHolder, SerializableDataHolder.Mutable, Sound.Emitter, TeamMember, ValueContainer

public interface TextDisplay extends DisplayEntity
  • Method Details

    • displayedText

      default Component displayedText()
      Returns the displayed text
      Returns:
      the displayed text
    • lineWidth

      default int lineWidth()
      Gets the maximum line width used to split lines of text.
      Returns:
      The maximum line width used to split lines of text
    • textOpacity

      default int textOpacity()
      Gets the opacity of the displayed text.
      Returns:
      The opacity of the displayed text
    • canSeeThroughBlocks

      default boolean canSeeThroughBlocks()
      Checks if the displayed text is visible through blocks.
      Returns:
      True if the displayed text is visible through blocks, false otherwise
    • hasShadow

      default boolean hasShadow()
      Checks if the displayed text has a shadow.
      Returns:
      True if the displayed text has a shadow, false otherwise
    • backgroundColor

      default Color backgroundColor()
      Gets the background color of the displayed text. Note that this supports alpha values.
      Returns:
      The background color of the displayed text
    • defaultBackground

      default boolean defaultBackground()
      Gets the background color of the displayed text.
      Returns:
      The background color of the displayed text
    • textAlignment

      default TextAlignment textAlignment()
      Gets the alignment direction of the displayed text.
      Returns:
      The alignment direction of the displayed text