Interface TextComponent

All Superinterfaces:
Component, ComponentBuilderApplicable, ComponentLike, HoverEventSource<Component>, ScopedComponent<TextComponent>, StyleGetter, StyleSetter<Component>
All Known Subinterfaces:
VirtualComponent

public sealed interface TextComponent extends ScopedComponent<TextComponent> permits VirtualComponent (not exhaustive)
A component that displays a string.

This component consists of:

content
string to be displayed
Since:
4.0.0
  • Method Details

    • content

      String content()
      Gets the plain text content.
      Returns:
      the plain text content
      Since:
      4.0.0
    • content

      @Contract(pure=true) TextComponent content(String content)
      Sets the plain text content.
      Parameters:
      content - the plain text content
      Returns:
      a copy of this component
      Since:
      4.0.0
    • toBuilder

      Description copied from interface: Component
      Returns a builder for this component.
      Specified by:
      toBuilder in interface Component
      Specified by:
      toBuilder in interface ScopedComponent<TextComponent>
      Returns:
      the builder