Interface TextComponent
- All Superinterfaces:
Buildable<TextComponent,,TextComponent.Builder> BuildableComponent<TextComponent,,TextComponent.Builder> Component
A component that displays text.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA builder for text components. -
Method Summary
Modifier and TypeMethodDescriptionstatic TextComponentempty()Returns a text component with no content.Returns the content of this component.static TextComponentnewline()Returns a text component with a newline character.static TextComponentspace()Returns a text component with only a space character.static TextComponent.Buildertext()Creates a new text component builder.static TextComponenttext(char ch) Creates a new text component with the specified character.static TextComponenttext(char ch, ComponentColor textColor) Creates a new text component with the specified character and text color.static TextComponentCreates a new text component with the specified character and text textStyle.static TextComponentCreates a new text component with the specified content.static TextComponenttext(String content, ComponentColor textColor) Creates a new text component with the specified content and text color.static TextComponentCreates a new text component with the specified content and text textStyle.Methods inherited from interface com.xpdustry.distributor.api.component.Component
compress, getTextStyle
-
Method Details
-
text
Creates a new text component builder. -
text
Creates a new text component with the specified content.- Parameters:
content- the content- Returns:
- the text component
-
text
Creates a new text component with the specified content and text color.- Parameters:
content- the contenttextColor- the text color- Returns:
- the text component
-
text
Creates a new text component with the specified content and text textStyle.- Parameters:
content- the contenttextStyle- the text textStyle- Returns:
- the text component
-
text
Creates a new text component with the specified character.- Parameters:
ch- the character- Returns:
- the text component
-
text
Creates a new text component with the specified character and text color.- Parameters:
ch- the charactertextColor- the text color- Returns:
- the text component
-
text
Creates a new text component with the specified character and text textStyle.- Parameters:
ch- the charactertextStyle- the text textStyle- Returns:
- the text component
-
space
Returns a text component with only a space character. -
newline
Returns a text component with a newline character. -
empty
Returns a text component with no content. -
getContent
String getContent()Returns the content of this component.
-