java.lang.Object
net.kyori.adventure.text.minimessage.internal.TagInternals

@Internal public final class TagInternals extends Object
Utility class for tag naming.
Since:
4.10.0
  • Method Details

    • assertValidTagName

      public static void assertValidTagName(@TagPattern String tagName)
      Checks if a tag name matches the pattern for allowed tag names. If it does not, then this method will throw an IllegalArgumentException
      Parameters:
      tagName - the name of the tag
      Since:
      4.10.0
    • sanitizeAndCheckValidTagName

      public static boolean sanitizeAndCheckValidTagName(@TagPattern String tagName)
      Checks if a tag name matches the pattern for allowed tag names, first sanitizing it by converting the tag name to lowercase. Returns a boolean representing the validity
      Parameters:
      tagName - the name of the tag
      Returns:
      validity of this tag when sanitized
      Since:
      4.10.1
    • sanitizeAndAssertValidTagName

      public static void sanitizeAndAssertValidTagName(@TagPattern String tagName)
      Checks if a tag name matches the pattern for allowed tag names, first sanitizing it by converting the tag name to lowercase. If it does not match the pattern, then this method will throw an IllegalArgumentException
      Parameters:
      tagName - the name of the tag
      Since:
      4.10.0