This commit is contained in:
hyperdefined
2024-12-17 17:47:14 -05:00
parent 6b263be041
commit 7b12a130a0
4 changed files with 7 additions and 7 deletions

View File

@@ -23,7 +23,7 @@
<groupId>lol.hyper</groupId>
<artifactId>toolstats</artifactId>
<version>1.8.4</version>
<version>1.8.5</version>
<packaging>jar</packaging>
<name>ToolStats</name>

View File

@@ -64,7 +64,7 @@ public class CraftItem implements Listener {
// if the player shift clicks, send them this warning
if (event.isShiftClick()) {
Component component = toolStats.configTools.formatLore("shift-click-warning", null, null);
Component component = toolStats.configTools.formatLore("shift-click-warning.crafting", null, null);
event.getWhoClicked().sendMessage(component);
}

View File

@@ -69,10 +69,8 @@ public class VillagerTrade implements Listener {
}
// if the player shift clicks, show the warning
if (event.isShiftClick()) {
String configMessage = toolStats.config.getString("messages.shift-click-warning.trading");
if (configMessage != null) {
player.sendMessage(ChatColor.translateAlternateColorCodes('&', configMessage));
}
Component component = toolStats.configTools.formatLore("shift-click-warning.trading", null, null);
event.getWhoClicked().sendMessage(component);
}
ItemStack newItem = addLore(item, player);
if (newItem != null) {

View File

@@ -107,7 +107,9 @@ public class ConfigTools {
Component component;
// set the placeholder to the value
if (placeHolder != null && value != null) {
lore = lore.replace(placeHolder, String.valueOf(value));
}
// if we match the old color codes, then format them as so
Matcher hexMatcher = CONFIG_HEX_PATTERN.matcher(lore);