diff --git a/src/main/java/lol/hyper/toolstats/tools/config/ConfigTools.java b/src/main/java/lol/hyper/toolstats/tools/config/ConfigTools.java index 8ff9c16..df526da 100644 --- a/src/main/java/lol/hyper/toolstats/tools/config/ConfigTools.java +++ b/src/main/java/lol/hyper/toolstats/tools/config/ConfigTools.java @@ -244,6 +244,13 @@ public class ConfigTools { List 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); diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index 5d5c01d..ac979c6 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -8,6 +8,7 @@ tokens: title: "&7ToolStats: &8Player Kills Token" lore: - "&8Combine with a melee or ranged weapon in an anvil to track player kills." + - "&8Uses &7{levels} &8level." levels: 1 custom-model-data: enabled: false @@ -17,6 +18,7 @@ tokens: title: "&7ToolStats: &8Mob Kills Token" lore: - "&8Combine with a melee or ranged weapon in an anvil to track mob kills." + - "&8Uses &7{levels} &8level." levels: 1 custom-model-data: enabled: false @@ -26,6 +28,7 @@ tokens: title: "&7ToolStats: &8Blocks Mined Token" lore: - "&8Combine with a pickaxe, axe, shovel, or shears in an anvil to track blocks mined." + - "&8Uses &7{levels} &8level." levels: 1 custom-model-data: enabled: false @@ -35,6 +38,7 @@ tokens: title: "&7ToolStats: &8Crops Mined Token" lore: - "&8Combine with a hoe in an anvil to track crops broken." + - "&8Uses &7{levels} &8level." levels: 1 custom-model-data: enabled: false @@ -44,6 +48,7 @@ tokens: title: "&7ToolStats: &8Fish Caught Token" lore: - "&8Combine with a fishing rod in an anvil to track fish caught." + - "&8Uses &7{levels} &8level." levels: 1 custom-model-data: enabled: false @@ -53,6 +58,7 @@ tokens: title: "&7ToolStats: &8Sheep Sheared Token" lore: - "&8Combine with shears in an anvil to track sheep sheared." + - "&8Uses &7{levels} &8level." levels: 1 custom-model-data: enabled: false @@ -62,6 +68,7 @@ tokens: title: "&7ToolStats: &8Damage Taken Token" lore: - "&8Combine with an armor piece in an anvil to track damage taken." + - "&8Uses &7{levels} &8level." levels: 1 custom-model-data: enabled: false @@ -71,6 +78,7 @@ tokens: title: "&7ToolStats: &8Damage Done Token" lore: - "&8Combine with a melee or ranged weapon in an anvil to track damage done." + - "&8Uses &7{levels} &8level." levels: 1 custom-model-data: enabled: false @@ -80,6 +88,7 @@ tokens: title: "&7ToolStats: &8Arrows Shot Token" lore: - "&8Combine with a bow or crossbow in an anvil to track arrows shot." + - "&8Uses &7{levels} &8level." levels: 1 custom-model-data: enabled: false @@ -89,6 +98,7 @@ tokens: title: "&7ToolStats: &8Flight Time Token" lore: - "&8Combine with an elytra in an anvil to track flight time." + - "&8Uses &7{levels} &8level." levels: 1 custom-model-data: enabled: false @@ -98,6 +108,7 @@ tokens: title: "&7ToolStats: &8Reset Token" lore: - "&8Combine in an anvil with to reset ALL stats for this item. Tokens on this item stay." + - "&8Uses &7{levels} &8level." levels: 1 custom-model-data: enabled: false @@ -107,6 +118,7 @@ tokens: title: "&7ToolStats: &8Remove Token" lore: - "&8Combine in an anvil with to REMOVE ALL stats and tokens for this item." + - "&8Uses &7{levels} &8level." levels: 1 custom-model-data: enabled: false