Enum Class DiscordComponentSerializer
java.lang.Object
java.lang.Enum<DiscordComponentSerializer>
net.lucypoulton.squirtgun.discord.adventure.DiscordComponentSerializer
- All Implemented Interfaces:
Serializable
,Comparable<DiscordComponentSerializer>
,Constable
,net.kyori.adventure.text.serializer.ComponentSerializer<net.kyori.adventure.text.Component,net.kyori.adventure.text.TextComponent,String>
public enum DiscordComponentSerializer
extends Enum<DiscordComponentSerializer>
implements net.kyori.adventure.text.serializer.ComponentSerializer<net.kyori.adventure.text.Component,net.kyori.adventure.text.TextComponent,String>
Serialises Components into Discord-formatted markdown. Discord's text format is
far less rich than Minecraft's, so some information, such as colour and events,
is discarded.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescription@NotNull net.kyori.adventure.text.TextComponent
deserialize(@NotNull String input)
@NotNull String
serialize(@NotNull net.kyori.adventure.text.Component component)
static DiscordComponentSerializer
Returns the enum constant of this class with the specified name.static DiscordComponentSerializer[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Methods inherited from interface net.kyori.adventure.text.serializer.ComponentSerializer
deseializeOrNull, deserializeOr, deserializeOrNull, serializeOr, serializeOrNull
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
deserialize
@NotNull public @NotNull net.kyori.adventure.text.TextComponent deserialize(@NotNull @NotNull String input)- Specified by:
deserialize
in 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)- Specified by:
serialize
in interfacenet.kyori.adventure.text.serializer.ComponentSerializer<net.kyori.adventure.text.Component,net.kyori.adventure.text.TextComponent,String>
-