Class MinecraftComponentSerializer
java.lang.Object
net.kyori.adventure.platform.bukkit.MinecraftComponentSerializer
- All Implemented Interfaces:
ComponentSerializer<Component,
Component, Object>
@Experimental
public final class MinecraftComponentSerializer
extends Object
implements ComponentSerializer<Component,Component,Object>
A component serializer for
net.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()
, an UnsupportedOperationException
will be thrown on any serialize or deserialize operations.
- Since:
- 4.0.0
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NotNull Component
deserialize
(@NotNull Object input) static @NotNull MinecraftComponentSerializer
get()
Gets the component serializer.static boolean
Gets whether this serializer is supported.@NotNull Object
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
-
MinecraftComponentSerializer
public MinecraftComponentSerializer()
-
-
Method Details
-
isSupported
public static boolean isSupported()Gets whether this serializer is supported.- Returns:
- if the serializer is supported.
- Since:
- 4.0.0
-
get
Gets the component serializer.- Returns:
- a component serializer
- Since:
- 4.0.0
-
deserialize
- Specified by:
deserialize
in interfaceComponentSerializer<Component,
Component, Object>
-
serialize
- Specified by:
serialize
in interfaceComponentSerializer<Component,
Component, Object>
-