Interface ComponentFlattener
- 
- All Superinterfaces:
- Buildable<ComponentFlattener,ComponentFlattener.Builder>
 
 public interface ComponentFlattener extends Buildable<ComponentFlattener,ComponentFlattener.Builder> A 'flattener' to convert a component tree to a linear string for display.- Since:
- 4.7.0
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Interface Description static interfaceComponentFlattener.BuilderA builder for a component flattener.
 - 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static @NotNull ComponentFlattenerbasic()A basic flattener that will print only information directly contained in components.static @NotNull ComponentFlattener.Builderbuilder()Create a new builder for a flattener.voidflatten(@NotNull Component input, @NotNull FlattenerListener listener)Perform a flattening on the component, providing output to thelistener.static @NotNull ComponentFlattenertextOnly()A component flattener that will only handle text components.
 
- 
- 
- 
Method Detail- 
builder@NotNull static @NotNull ComponentFlattener.Builder builder() Create a new builder for a flattener.- Returns:
- a new builder
- Since:
- 4.7.0
 
 - 
basic@NotNull static @NotNull ComponentFlattener basic() A basic flattener that will print only information directly contained in components.The output of this flattener aims to match what the vanilla Minecraft: Java Edition client will display when unable to resolve any game data. - Returns:
- a basic flattener
- Since:
- 4.7.0
 
 - 
textOnly@NotNull static @NotNull ComponentFlattener textOnly() A component flattener that will only handle text components.All other component types will not be included in the output. - Returns:
- a text-only flattener
- Since:
- 4.7.0
 
 - 
flattenvoid flatten(@NotNull @NotNull Component input, @NotNull @NotNull FlattenerListener listener)Perform a flattening on the component, providing output to thelistener.- Parameters:
- input- the component to be flattened
- listener- the listener that will receive flattened component state
- Since:
- 4.7.0
 
 
- 
 
-