{levels} placeholder

This commit is contained in:
hyperdefined
2025-05-15 18:13:47 -04:00
parent c7cd25e866
commit 68318e3af2
2 changed files with 19 additions and 0 deletions

View File

@@ -244,6 +244,13 @@ public class ConfigTools {
List<Component> finalLore = new ArrayList<>();
for (String line : raw) {
if (line.contains("{levels}")) {
Integer levels = toolStats.config.getInt("tokes.data." + tokenType + ".levels");
// will return 0 if it doesn't exist
if (levels != 0) {
line = line.replace("{levels}", String.valueOf(levels));
}
}
Component component;
// if we match the old color codes, then format them as so
Matcher hexMatcher = CONFIG_HEX_PATTERN.matcher(line);