Interface PlainTextComponentSerializer
- All Superinterfaces:
net.kyori.adventure.util.Buildable<PlainTextComponentSerializer,PlainTextComponentSerializer.Builder>
,net.kyori.adventure.text.serializer.ComponentSerializer<net.kyori.adventure.text.Component,net.kyori.adventure.text.TextComponent,String>
public interface PlainTextComponentSerializer extends net.kyori.adventure.text.serializer.ComponentSerializer<net.kyori.adventure.text.Component,net.kyori.adventure.text.TextComponent,String>, net.kyori.adventure.util.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
Nested Classes Modifier and Type Interface Description static interface
PlainTextComponentSerializer.Builder
A builder for the plain-text component serializer.static interface
PlainTextComponentSerializer.Provider
APlainTextComponentSerializer
service provider. -
Method Summary
Modifier and Type Method Description static @NotNull PlainTextComponentSerializer.Builder
builder()
Create a new builder.default @NotNull net.kyori.adventure.text.TextComponent
deserialize(@NotNull String input)
static @NotNull PlainTextComponentSerializer
plainText()
A component serializer for plain-based serialization and deserialization.void
serialize(@NotNull StringBuilder sb, @NotNull net.kyori.adventure.text.Component component)
Serializes.default @NotNull String
serialize(@NotNull net.kyori.adventure.text.Component component)
Methods inherited from interface net.kyori.adventure.util.Buildable
toBuilder
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
@NotNull default @NotNull net.kyori.adventure.text.TextComponent deserialize(@NotNull @NotNull String input)- Specified by:
deserialize
in interfacenet.kyori.adventure.text.serializer.ComponentSerializer<net.kyori.adventure.text.Component,net.kyori.adventure.text.TextComponent,String>
-
serialize
@NotNull default @NotNull String serialize(@NotNull @NotNull net.kyori.adventure.text.Component component)- Specified by:
serialize
in interfacenet.kyori.adventure.text.serializer.ComponentSerializer<net.kyori.adventure.text.Component,net.kyori.adventure.text.TextComponent,String>
-
serialize
void serialize(@NotNull @NotNull StringBuilder sb, @NotNull @NotNull net.kyori.adventure.text.Component component)Serializes.- Parameters:
sb
- the string buildercomponent
- the component- Since:
- 4.8.0
-