Class PlainComponentSerializer
java.lang.Object
net.kyori.adventure.text.serializer.plain.PlainComponentSerializer
- All Implemented Interfaces:
net.kyori.adventure.text.serializer.ComponentSerializer<net.kyori.adventure.text.Component,net.kyori.adventure.text.TextComponent,String>,net.kyori.adventure.util.Buildable<PlainComponentSerializer,PlainComponentSerializer.Builder>
@Deprecated public class PlainComponentSerializer extends Object implements net.kyori.adventure.text.serializer.ComponentSerializer<net.kyori.adventure.text.Component,net.kyori.adventure.text.TextComponent,String>, net.kyori.adventure.util.Buildable<PlainComponentSerializer,PlainComponentSerializer.Builder>
Deprecated.
A plain component serializer.
Plain does not support more complex features such as, but not limited
to, colours, decorations, ClickEvent, and HoverEvent.
- Since:
- 4.0.0
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfacePlainComponentSerializer.BuilderDeprecated.for removal since 4.8.0, usePlainTextComponentSerializer.Builderinstead -
Constructor Summary
Constructors Constructor Description PlainComponentSerializer()Deprecated.for removal since 4.7.0PlainComponentSerializer(@Nullable Function<net.kyori.adventure.text.KeybindComponent,String> keybind, @Nullable Function<net.kyori.adventure.text.TranslatableComponent,String> translatable)Deprecated.for removal since 4.7.0, use the builder instead -
Method Summary
Modifier and Type Method Description static @NotNull PlainComponentSerializer.Builderbuilder()Deprecated.for removal since 4.8.0, usePlainTextComponentSerializer.builder()instead@NotNull net.kyori.adventure.text.TextComponentdeserialize(@NotNull String input)Deprecated.static @NotNull PlainComponentSerializerplain()Deprecated.for removal since 4.8.0, usePlainTextComponentSerializer.plainText()insteadvoidserialize(@NotNull StringBuilder sb, @NotNull net.kyori.adventure.text.Component component)Deprecated.for removal since 4.8.0, usePlainTextComponentSerializer.serialize(StringBuilder, Component)instead@NotNull Stringserialize(@NotNull net.kyori.adventure.text.Component component)Deprecated.@NotNull PlainComponentSerializer.BuildertoBuilder()Deprecated.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.kyori.adventure.text.serializer.ComponentSerializer
deseializeOrNull, deserializeOr, deserializeOrNull, serializeOr, serializeOrNull
-
Constructor Details
-
PlainComponentSerializer
Deprecated.for removal since 4.7.0Constructs.- Since:
- 4.0.0
-
PlainComponentSerializer
@Deprecated public PlainComponentSerializer(@Nullable @Nullable Function<net.kyori.adventure.text.KeybindComponent,String> keybind, @Nullable @Nullable Function<net.kyori.adventure.text.TranslatableComponent,String> translatable)Deprecated.for removal since 4.7.0, use the builder insteadConstructs.- Parameters:
keybind- the keybind renderertranslatable- the translatable renderer- Since:
- 4.0.0
-
-
Method Details
-
plain
Deprecated.for removal since 4.8.0, usePlainTextComponentSerializer.plainText()insteadA component serializer for plain-based serialization and deserialization.- Returns:
- serializer instance
- Since:
- 4.0.0
-
builder
Deprecated.for removal since 4.8.0, usePlainTextComponentSerializer.builder()insteadCreate a new builder.- Returns:
- a new plain serializer builder
- Since:
- 4.7.0
-
deserialize
@NotNull public @NotNull net.kyori.adventure.text.TextComponent deserialize(@NotNull @NotNull String input)Deprecated.- Specified by:
deserializein interfacenet.kyori.adventure.text.serializer.ComponentSerializer<net.kyori.adventure.text.Component,net.kyori.adventure.text.TextComponent,String>
-
serialize
@NotNull public @NotNull String serialize(@NotNull @NotNull net.kyori.adventure.text.Component component)Deprecated.- Specified by:
serializein interfacenet.kyori.adventure.text.serializer.ComponentSerializer<net.kyori.adventure.text.Component,net.kyori.adventure.text.TextComponent,String>
-
serialize
@Deprecated public void serialize(@NotNull @NotNull StringBuilder sb, @NotNull @NotNull net.kyori.adventure.text.Component component)Deprecated.for removal since 4.8.0, usePlainTextComponentSerializer.serialize(StringBuilder, Component)insteadSerializes.- Parameters:
sb- the string buildercomponent- the component- Since:
- 4.0.0
-
toBuilder
Deprecated.- Specified by:
toBuilderin interfacenet.kyori.adventure.util.Buildable<PlainComponentSerializer,PlainComponentSerializer.Builder>
-
PlainTextComponentSerializerinstead