Class AdventureSerializer
java.lang.Object
com.github.retrooper.packetevents.util.adventure.AdventureSerializer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
asVanilla
(net.kyori.adventure.text.Component component) static net.kyori.adventure.text.Component
fromLegacyFormat
(String legacyMessage) static net.kyori.adventure.text.Component
static net.kyori.adventure.text.serializer.gson.GsonComponentSerializer
static net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer
Deprecated.static net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer
static AdventureNBTSerializer
static net.kyori.adventure.text.Component
parseComponent
(String json) static net.kyori.adventure.text.Component
parseJsonTree
(com.google.gson.JsonElement json) static String
toJson
(net.kyori.adventure.text.Component component) static com.google.gson.JsonElement
toJsonTree
(net.kyori.adventure.text.Component component) static String
toLegacyFormat
(net.kyori.adventure.text.Component component) static NBT
toNbt
(net.kyori.adventure.text.Component component)
-
Constructor Details
-
AdventureSerializer
public AdventureSerializer()
-
-
Method Details
-
getGsonSerializer
public static net.kyori.adventure.text.serializer.gson.GsonComponentSerializer getGsonSerializer() -
getLegacyGsonSerializer
@Deprecated public static net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer getLegacyGsonSerializer()Deprecated. -
getLegacySerializer
public static net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer getLegacySerializer() -
getNBTSerializer
-
asVanilla
-
fromLegacyFormat
-
toLegacyFormat
-
parseComponent
-
parseJsonTree
public static net.kyori.adventure.text.Component parseJsonTree(com.google.gson.JsonElement json) -
toJson
-
toJsonTree
public static com.google.gson.JsonElement toJsonTree(net.kyori.adventure.text.Component component) -
fromNbt
-
toNbt
-