Package com.kamikazejam.kamicommon.util
Class ColoredStringParser
java.lang.Object
com.kamikazejam.kamicommon.util.ColoredStringParser
Utility for mapping
See individual methods for specific parsing behavior.
String objects into VersionedComponent objects,
handling both legacy color codes and modern MiniMessage format.See individual methods for specific parsing behavior.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull VersionedComponentIdentifies the type of title string being used, and tries its best to set it correctly on the builder.
Supports (parsed in this order):
- Legacy Section (contains § symbols)
- MiniMessage (contains <tag> tags)
- Legacy Ampersand (contains & symbols)static @NotNull List<VersionedComponent> Parses a list of strings into a list ofVersionedComponentobjects, using the same logic asparse(String)for each line.
This is useful for parsing lore lists from configuration files or other sources.
-
Constructor Details
-
ColoredStringParser
public ColoredStringParser()
-
-
Method Details
-
parse
Identifies the type of title string being used, and tries its best to set it correctly on the builder.
Supports (parsed in this order):
- Legacy Section (contains § symbols)
- MiniMessage (contains <tag> tags)
- Legacy Ampersand (contains & symbols) -
parse
@NotNull public static @NotNull List<VersionedComponent> parse(@NotNull @NotNull List<String> input) Parses a list of strings into a list ofVersionedComponentobjects, using the same logic asparse(String)for each line.
This is useful for parsing lore lists from configuration files or other sources.
-