Class PlainComponentSerializer
- java.lang.Object
-
- net.kyori.adventure.text.serializer.plain.PlainComponentSerializer
-
- All Implemented Interfaces:
ComponentDecoder<java.lang.String,TextComponent>
,ComponentEncoder<Component,java.lang.String>
,ComponentSerializer<Component,TextComponent,java.lang.String>
,Buildable<PlainComponentSerializer,PlainComponentSerializer.Builder>
@ScheduledForRemoval(inVersion="5.0.0") @Deprecated public class PlainComponentSerializer extends java.lang.Object implements ComponentSerializer<Component,TextComponent,java.lang.String>, Buildable<PlainComponentSerializer,PlainComponentSerializer.Builder>
Deprecated.for removal since 4.8.0, usePlainTextComponentSerializer
insteadA plain component serializer.Plain does not support more complex features such as, but not limited to, colours, decorations,
ClickEvent
, andHoverEvent
.- Since:
- 4.0.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
PlainComponentSerializer.Builder
Deprecated.for removal since 4.8.0, usePlainTextComponentSerializer.Builder
instead
-
Constructor Summary
Constructors Constructor Description PlainComponentSerializer()
Deprecated.for removal since 4.7.0PlainComponentSerializer(@Nullable java.util.function.Function<KeybindComponent,java.lang.String> keybind, @Nullable java.util.function.Function<TranslatableComponent,java.lang.String> translatable)
Deprecated.for removal since 4.7.0, use the builder instead
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static @NotNull PlainComponentSerializer.Builder
builder()
Deprecated.for removal since 4.8.0, usePlainTextComponentSerializer.builder()
instead@NotNull TextComponent
deserialize(@NotNull java.lang.String input)
Deprecated.static @NotNull PlainComponentSerializer
plain()
Deprecated.for removal since 4.8.0, usePlainTextComponentSerializer.plainText()
insteadvoid
serialize(@NotNull java.lang.StringBuilder sb, @NotNull Component component)
Deprecated.for removal since 4.8.0, usePlainTextComponentSerializer.serialize(StringBuilder, Component)
instead@NotNull java.lang.String
serialize(@NotNull Component component)
Deprecated.@NotNull PlainComponentSerializer.Builder
toBuilder()
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 Detail
-
PlainComponentSerializer
@ScheduledForRemoval(inVersion="5.0.0") @Deprecated public PlainComponentSerializer()
Deprecated.for removal since 4.7.0Constructs.- Since:
- 4.0.0
-
PlainComponentSerializer
@ScheduledForRemoval(inVersion="5.0.0") @Deprecated public PlainComponentSerializer(@Nullable @Nullable java.util.function.Function<KeybindComponent,java.lang.String> keybind, @Nullable @Nullable java.util.function.Function<TranslatableComponent,java.lang.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 Detail
-
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
@NotNull public @NotNull TextComponent deserialize(@NotNull @NotNull java.lang.String input)
Deprecated.- Specified by:
deserialize
in interfaceComponentDecoder<java.lang.String,TextComponent>
- Specified by:
deserialize
in interfaceComponentSerializer<Component,TextComponent,java.lang.String>
-
serialize
@NotNull public @NotNull java.lang.String serialize(@NotNull @NotNull Component component)
Deprecated.- Specified by:
serialize
in interfaceComponentEncoder<Component,java.lang.String>
- Specified by:
serialize
in interfaceComponentSerializer<Component,TextComponent,java.lang.String>
-
serialize
@ScheduledForRemoval(inVersion="5.0.0") @Deprecated public void serialize(@NotNull @NotNull java.lang.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
public @NotNull PlainComponentSerializer.Builder toBuilder()
Deprecated.- Specified by:
toBuilder
in interfaceBuildable<PlainComponentSerializer,PlainComponentSerializer.Builder>
-
-