mirror of
https://github.com/hyperdefined/ToolStats.git
synced 2025-12-08 13:44:59 +00:00
{levels} placeholder
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user