Interface PlainTextComponentSerializer
- All Superinterfaces:
Buildable<PlainTextComponentSerializer,
,PlainTextComponentSerializer.Builder> ComponentDecoder<String,
,TextComponent> ComponentEncoder<Component,
,String> ComponentSerializer<Component,
TextComponent, String>
public interface PlainTextComponentSerializer
extends ComponentSerializer<Component,TextComponent,String>, Buildable<PlainTextComponentSerializer,PlainTextComponentSerializer.Builder>
A plain-text component serializer.
Plain does not support more complex features such as, but not limited
to, colours, decorations, ClickEvent
, and HoverEvent
.
- Since:
- 4.8.0
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
A builder for the plain-text component serializer.static interface
APlainTextComponentSerializer
service provider. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull PlainTextComponentSerializer.Builder
builder()
Create a new builder.default @NotNull TextComponent
deserialize
(@NotNull String input) static @NotNull PlainTextComponentSerializer
A component serializer for plain-based serialization and deserialization.void
serialize
(@NotNull StringBuilder sb, @NotNull Component component) Serializes.default @NotNull String
Methods inherited from interface net.kyori.adventure.text.serializer.ComponentSerializer
deseializeOrNull, deserializeOr, deserializeOrNull, serializeOr, serializeOrNull
-
Method Details
-
plainText
A component serializer for plain-based serialization and deserialization.- Returns:
- serializer instance
- Since:
- 4.8.0
-
builder
Create a new builder.- Returns:
- a new plain serializer builder
- Since:
- 4.8.0
-
deserialize
- Specified by:
deserialize
in interfaceComponentDecoder<String,
TextComponent> - Specified by:
deserialize
in interfaceComponentSerializer<Component,
TextComponent, String>
-
serialize
- Specified by:
serialize
in interfaceComponentEncoder<Component,
String> - Specified by:
serialize
in interfaceComponentSerializer<Component,
TextComponent, String>
-
serialize
Serializes.- Parameters:
sb
- the string buildercomponent
- the component- Since:
- 4.8.0
-