Package me.totalfreedom.utils.kyori
Class FreedomMiniMessage
java.lang.Object
me.totalfreedom.utils.kyori.FreedomMiniMessage
This class contains a wrapper for a MiniMessage serializer.
-
Method Summary
Modifier and TypeMethodDescriptionstatic net.kyori.adventure.text.Componentdeserialize(boolean safe, String input, net.kyori.adventure.text.minimessage.tag.resolver.TagResolver... placeholders) Deserializes an input string using an instance of MiniMessage that is either safe (resolves only a specific set of tags) or unsafe (resolves all tags).static Stringserialize(boolean safe, net.kyori.adventure.text.Component input) Serializes an input component using an instance of MiniMessage that is either safe (resolves only a specific set of tags) or unsafe (resolves all tags).
-
Method Details
-
deserialize
public static net.kyori.adventure.text.Component deserialize(boolean safe, String input, net.kyori.adventure.text.minimessage.tag.resolver.TagResolver... placeholders) Deserializes an input string using an instance of MiniMessage that is either safe (resolves only a specific set of tags) or unsafe (resolves all tags).- Parameters:
safe- Whether to use a safe instance of MiniMessageinput- An input string formatted with MiniMessage's inputplaceholders- Custom placeholders to use when processing the input- Returns:
- A processed Component
-
serialize
Serializes an input component using an instance of MiniMessage that is either safe (resolves only a specific set of tags) or unsafe (resolves all tags).- Parameters:
safe- Whether to use a safe instance of MiniMessageinput- An already processed component- Returns:
- A processed Component
-