Class MessageParser
java.lang.Object
dev.ua.theroer.magicutils.logger.MessageParser
Shared helpers for parsing MiniMessage/legacy hybrid strings.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringescapeAttribute(String value) Escapes a value for use inside a MiniMessage tag attribute (e.g.static net.kyori.adventure.text.ComponentparseSmart(String input) Parse a string that may contain legacy colors and/or MiniMessage tags.
-
Method Details
-
parseSmart
Parse a string that may contain legacy colors and/or MiniMessage tags.- Parameters:
input- source string- Returns:
- parsed component (never null)
-
escapeAttribute
Escapes a value for use inside a MiniMessage tag attribute (e.g. the target of<click:run_command:"...">or<hover:show_text:"...">), so quotes and tag brackets in the value don't break the surrounding tag.- Parameters:
value- raw attribute value (null yields empty string)- Returns:
- escaped value safe to embed in a quoted MiniMessage attribute
-