Interface ANSIComponentSerializer.Builder
- All Superinterfaces:
AbstractBuilder<ANSIComponentSerializer>
- Enclosing interface:
ANSIComponentSerializer
public static interface ANSIComponentSerializer.Builder
extends AbstractBuilder<ANSIComponentSerializer>
A builder for the ANSI component serializer.
- Since:
- 4.14.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the serializer.colorLevel(net.kyori.ansi.ColorLevel colorLevel) Sets the default color level used when serializing.flattener(ComponentFlattener componentFlattener) Sets the component flattener instance to use when traversing the component for serialization.
-
Method Details
-
colorLevel
Sets the default color level used when serializing.By default, this serializer will use
ColorLevel.compute()to try to detect the color level of the terminal being used.- Parameters:
colorLevel- the color level- Returns:
- this builder
- Since:
- 4.14.0
- See Also:
-
flattener
Sets the component flattener instance to use when traversing the component for serialization.By default, this serializer will use
ComponentFlattener.basic().- Parameters:
componentFlattener- the flattener instance.- Returns:
- this builder
- Since:
- 4.14.0
-
build
ANSIComponentSerializer build()Builds the serializer.- Specified by:
buildin interfaceAbstractBuilder<ANSIComponentSerializer>- Returns:
- the built serializer
-