Class FreedomMiniMessage

java.lang.Object
me.totalfreedom.utils.kyori.FreedomMiniMessage

public class FreedomMiniMessage extends Object
This class contains a wrapper for a MiniMessage serializer.
  • Method Summary

    Modifier and Type
    Method
    Description
    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).
    static String
    serialize(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).

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 MiniMessage
      input - An input string formatted with MiniMessage's input
      placeholders - Custom placeholders to use when processing the input
      Returns:
      A processed Component
    • serialize

      public static String serialize(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).
      Parameters:
      safe - Whether to use a safe instance of MiniMessage
      input - An already processed component
      Returns:
      A processed Component