Class MinecraftComponentSerializer
- java.lang.Object
-
- net.kyori.adventure.platform.bukkit.MinecraftComponentSerializer
-
- All Implemented Interfaces:
net.kyori.adventure.text.serializer.ComponentSerializer<net.kyori.adventure.text.Component,net.kyori.adventure.text.Component,Object>
@Experimental public final class MinecraftComponentSerializer extends Object implements net.kyori.adventure.text.serializer.ComponentSerializer<net.kyori.adventure.text.Component,net.kyori.adventure.text.Component,Object>
A component serializer fornet.minecraft.server.<version>.IChatBaseComponent.Due to Bukkit version namespaces, the return type does not reflect the actual type.
Color downsampling will be performed as necessary for the running server version.
If not
isSupported(), anUnsupportedOperationExceptionwill be thrown on any serialize or deserialize operations.- Since:
- 4.0.0
- See Also:
get()
-
-
Constructor Summary
Constructors Constructor Description MinecraftComponentSerializer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull net.kyori.adventure.text.Componentdeserialize(@NotNull Object input)static @NotNull MinecraftComponentSerializerget()Gets the component serializer.static booleanisSupported()Gets whether this serializer is supported.@NotNull Objectserialize(@NotNull net.kyori.adventure.text.Component component)
-
-
-
Method Detail
-
isSupported
public static boolean isSupported()
Gets whether this serializer is supported.- Returns:
- if the serializer is supported.
- Since:
- 4.0.0
-
get
@NotNull public static @NotNull MinecraftComponentSerializer get()
Gets the component serializer.- Returns:
- a component serializer
- Since:
- 4.0.0
-
deserialize
@NotNull public @NotNull net.kyori.adventure.text.Component deserialize(@NotNull @NotNull Object input)- Specified by:
deserializein interfacenet.kyori.adventure.text.serializer.ComponentSerializer<net.kyori.adventure.text.Component,net.kyori.adventure.text.Component,Object>
-
-