Interface TextComponent

All Superinterfaces:
Buildable<TextComponent,TextComponent.Builder>, BuildableComponent<TextComponent,TextComponent.Builder>, Component, ComponentBuilderApplicable, ComponentLike, net.kyori.examination.Examinable, HoverEventSource<Component>, ScopedComponent<TextComponent>, StyleGetter, StyleSetter<Component>
All Known Subinterfaces:
VirtualComponent

A component that displays a string.

This component consists of:

content
string to be displayed
Since:
4.0.0
  • Method Details

    • ofChildren

      @ScheduledForRemoval(inVersion="5.0.0") @Deprecated @NotNull static @NotNull TextComponent ofChildren(@NotNull @NotNull ComponentLike @NotNull ... components)
      Deprecated.
      for removal since 4.9.0, use Component.textOfChildren(ComponentLike...) instead
      Creates a component with components as the children.
      Parameters:
      components - the children
      Returns:
      a text component
      Since:
      4.0.0
    • content

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

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

      @NotNull default @NotNull Stream<? extends net.kyori.examination.ExaminableProperty> examinableProperties()
      Specified by:
      examinableProperties in interface Component
      Specified by:
      examinableProperties in interface net.kyori.examination.Examinable