Class TextComponentProducer
java.lang.Object
com.sk89q.worldedit.util.formatting.component.TextComponentProducer
- Direct Known Subclasses:
CodeFormat
,CommandUsageBox
,ErrorFormat
,LabelFormat
,MessageBox
,SubtleFormat
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappend
(com.sk89q.worldedit.util.formatting.text.Component component) Adds a component as a child to this Producer.Adds a string as a child to this Producer.com.sk89q.worldedit.util.formatting.text.TextComponent
create()
Create a TextComponent from this producer.com.sk89q.worldedit.util.formatting.text.TextComponent.Builder
newline()
Adds a newline as a child to this Producer.reset()
Reset the producer to a clean slate.
-
Constructor Details
-
TextComponentProducer
public TextComponentProducer()
-
-
Method Details
-
getBuilder
public com.sk89q.worldedit.util.formatting.text.TextComponent.Builder getBuilder() -
append
Adds a component as a child to this Producer.- Parameters:
component
- The component- Returns:
- The producer, for chaining
-
append
Adds a string as a child to this Producer.- Parameters:
string
- The text- Returns:
- The producer, for chaining
-
newline
Adds a newline as a child to this Producer.- Returns:
- The producer, for chaining
-
create
public com.sk89q.worldedit.util.formatting.text.TextComponent create()Create a TextComponent from this producer.- Returns:
- The component
-
reset
Reset the producer to a clean slate.- Returns:
- The producer, for chaining
-