Interface PlainTextComponentSerializer
-
- All Superinterfaces:
Buildable<PlainTextComponentSerializer,PlainTextComponentSerializer.Builder>
,ComponentDecoder<java.lang.String,TextComponent>
,ComponentEncoder<Component,java.lang.String>
,ComponentSerializer<Component,TextComponent,java.lang.String>
public interface PlainTextComponentSerializer extends ComponentSerializer<Component,TextComponent,java.lang.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
, andHoverEvent
.- 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
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static @NotNull PlainTextComponentSerializer.Builder
builder()
Create a new builder.default @NotNull TextComponent
deserialize(@NotNull java.lang.String input)
static @NotNull PlainTextComponentSerializer
plainText()
A component serializer for plain-based serialization and deserialization.void
serialize(@NotNull java.lang.StringBuilder sb, @NotNull Component component)
Serializes.default @NotNull java.lang.String
serialize(@NotNull Component component)
-
Methods inherited from interface net.kyori.adventure.text.serializer.ComponentSerializer
deseializeOrNull, deserializeOr, deserializeOrNull, serializeOr, serializeOrNull
-
-
-
-
Method Detail
-
plainText
@NotNull static @NotNull PlainTextComponentSerializer plainText()
A component serializer for plain-based serialization and deserialization.- Returns:
- serializer instance
- Since:
- 4.8.0
-
builder
static @NotNull PlainTextComponentSerializer.Builder builder()
Create a new builder.- Returns:
- a new plain serializer builder
- Since:
- 4.8.0
-
deserialize
@NotNull default @NotNull TextComponent deserialize(@NotNull @NotNull java.lang.String input)
- Specified by:
deserialize
in interfaceComponentDecoder<java.lang.String,TextComponent>
- Specified by:
deserialize
in interfaceComponentSerializer<Component,TextComponent,java.lang.String>
-
serialize
@NotNull default @NotNull java.lang.String serialize(@NotNull @NotNull Component component)
- Specified by:
serialize
in interfaceComponentEncoder<Component,java.lang.String>
- Specified by:
serialize
in interfaceComponentSerializer<Component,TextComponent,java.lang.String>
-
serialize
void serialize(@NotNull @NotNull java.lang.StringBuilder sb, @NotNull @NotNull Component component)
Serializes.- Parameters:
sb
- the string buildercomponent
- the component- Since:
- 4.8.0
-
-