Class PlainComponentSerializer
java.lang.Object
net.kyori.adventure.text.serializer.plain.PlainComponentSerializer
- All Implemented Interfaces:
ComponentDecoder<String,
,TextComponent> ComponentEncoder<Component,
,String> ComponentSerializer<Component,
,TextComponent, String> Buildable<PlainComponentSerializer,
PlainComponentSerializer.Builder>
@ScheduledForRemoval(inVersion="5.0.0")
@Deprecated
public class PlainComponentSerializer
extends Object
implements ComponentSerializer<Component,TextComponent,String>, 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
Modifier and TypeClassDescriptionstatic interface
Deprecated.for removal since 4.8.0, usePlainTextComponentSerializer.Builder
instead -
Constructor Summary
ConstructorDescriptionDeprecated.for removal since 4.7.0PlainComponentSerializer
(@Nullable Function<KeybindComponent, String> keybind, @Nullable Function<TranslatableComponent, String> translatable) Deprecated.for removal since 4.7.0, use the builder instead -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull PlainComponentSerializer.Builder
builder()
Deprecated.for removal since 4.8.0, usePlainTextComponentSerializer.builder()
instead@NotNull TextComponent
deserialize
(@NotNull String input) Deprecated.static @NotNull PlainComponentSerializer
plain()
Deprecated.for removal since 4.8.0, usePlainTextComponentSerializer.plainText()
insteadvoid
serialize
(@NotNull StringBuilder sb, @NotNull Component component) Deprecated.for removal since 4.8.0, usePlainTextComponentSerializer.serialize(StringBuilder, Component)
instead@NotNull String
Deprecated.@NotNull PlainComponentSerializer.Builder
Deprecated.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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
@ScheduledForRemoval(inVersion="5.0.0") @Deprecated public PlainComponentSerializer(@Nullable @Nullable Function<KeybindComponent, String> keybind, @Nullable @Nullable Function<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
@ScheduledForRemoval(inVersion="5.0.0") @Deprecated @NotNull public static @NotNull PlainComponentSerializer 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
@ScheduledForRemoval(inVersion="5.0.0") @Deprecated public static @NotNull PlainComponentSerializer.Builder 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
Deprecated.- Specified by:
deserialize
in interfaceComponentDecoder<String,
TextComponent> - Specified by:
deserialize
in interfaceComponentSerializer<Component,
TextComponent, String>
-
serialize
Deprecated.- Specified by:
serialize
in interfaceComponentEncoder<Component,
String> - Specified by:
serialize
in interfaceComponentSerializer<Component,
TextComponent, String>
-
serialize
@ScheduledForRemoval(inVersion="5.0.0") @Deprecated public void serialize(@NotNull @NotNull StringBuilder sb, @NotNull @NotNull 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:
toBuilder
in interfaceBuildable<PlainComponentSerializer,
PlainComponentSerializer.Builder>
-
PlainTextComponentSerializer
instead