Class TagInternals
java.lang.Object
net.kyori.adventure.text.minimessage.internal.TagInternals
Utility class for tag naming.
- Since:
- 4.10.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidassertValidTagName(String tagName) Checks if a tag name matches the pattern for allowed tag names.static voidsanitizeAndAssertValidTagName(String tagName) Checks if a tag name matches the pattern for allowed tag names, first sanitizing it by converting the tag name to lowercase.static booleansanitizeAndCheckValidTagName(String tagName) Checks if a tag name matches the pattern for allowed tag names, first sanitizing it by converting the tag name to lowercase.
-
Method Details
-
assertValidTagName
Checks if a tag name matches the pattern for allowed tag names. If it does not, then this method will throw anIllegalArgumentException- Parameters:
tagName- the name of the tag- Since:
- 4.10.0
-
sanitizeAndCheckValidTagName
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
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 anIllegalArgumentException- Parameters:
tagName- the name of the tag- Since:
- 4.10.0
-