Package net.kyori.adventure.text
Interface TextComponent
- All Superinterfaces:
- Buildable<TextComponent,TextComponent.Builder>,- BuildableComponent<TextComponent,TextComponent.Builder>,- Component,- ComponentBuilderApplicable,- ComponentLike,- net.kyori.examination.Examinable,- HoverEventSource<Component>,- ScopedComponent<TextComponent>
public interface TextComponent extends BuildableComponent<TextComponent,TextComponent.Builder>, ScopedComponent<TextComponent>
A text component.
- Since:
- 4.0.0
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceTextComponent.BuilderA text component builder.
- 
Method SummaryModifier and Type Method Description @NonNull Stringcontent()Gets the plain text content.@NonNull TextComponentcontent(@NonNull String content)Sets the plain text content.static @NonNull TextComponentofChildren(@NonNull ComponentLike @NonNull ... components)Creates a component withcomponentsas the children.Methods inherited from interface net.kyori.adventure.text.ComponentasComponent, asHoverEvent, children, clickEvent, color, componentBuilderApply, contains, decoration, decorations, decorations, detectCycle, hasDecoration, hasStyling, hoverEvent, insertion, replaceFirstText, replaceFirstText, replaceText, replaceText, replaceText, replaceText, replaceText, replaceText, replaceText, replaceText, style, styleMethods inherited from interface net.kyori.examination.ExaminableexaminableName, examinableProperties, examineMethods inherited from interface net.kyori.adventure.text.ScopedComponentappend, append, append, children, clickEvent, color, colorIfAbsent, decorate, decoration, decoration, hoverEvent, insertion, mergeStyle, mergeStyle, mergeStyle, style, style, style
- 
Method Details- 
ofChildrenCreates a component withcomponentsas the children.- Parameters:
- components- the children
- Returns:
- a text component
- Since:
- 4.0.0
 
- 
content@NonNull String content()Gets the plain text content.- Returns:
- the plain text content
- Since:
- 4.0.0
 
- 
contentSets the plain text content.- Parameters:
- content- the plain text content
- Returns:
- a copy of this component
- Since:
- 4.0.0
 
 
-