Class ComponentUtilities
java.lang.Object
net.headmonitor.MonitorLibSpigot.utilities.ComponentUtilities
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic net.kyori.adventure.text.Component
deserialize
(String stringToDeserialize) Deserializes the given String using the Adventure API.static net.kyori.adventure.text.Component
deserialize
(net.kyori.adventure.text.Component componentToDeserialize) Deserializes the given Component using the Adventure API.static String
legacySerialize
(net.kyori.adventure.text.Component component) Serializes the given Component to Legacy Text String.
-
Constructor Details
-
ComponentUtilities
public ComponentUtilities()
-
-
Method Details
-
deserialize
Deserializes the given String using the Adventure API. If message doesn't explicitly setClick Italics, it removes them. Sets default color to White.- Parameters:
stringToDeserialize
- The String to Deserialize.- Returns:
- Returns the Deserialized String.
-
deserialize
public static net.kyori.adventure.text.Component deserialize(net.kyori.adventure.text.Component componentToDeserialize) Deserializes the given Component using the Adventure API. If message doesn't explicitly setClick Italics, it removes them. Sets default color to White.- Parameters:
componentToDeserialize
- The Component to Deserialize.- Returns:
- Returns the Deserialized String.
-
legacySerialize
Serializes the given Component to Legacy Text String.- Parameters:
component
- The Component to Serialize.- Returns:
- The Serialized String.
-