mirror of
https://github.com/hyperdefined/ToolStats.git
synced 2025-12-06 06:41:44 +00:00
1.8.5
This commit is contained in:
2
pom.xml
2
pom.xml
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
<groupId>lol.hyper</groupId>
|
<groupId>lol.hyper</groupId>
|
||||||
<artifactId>toolstats</artifactId>
|
<artifactId>toolstats</artifactId>
|
||||||
<version>1.8.4</version>
|
<version>1.8.5</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
<name>ToolStats</name>
|
<name>ToolStats</name>
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public class CraftItem implements Listener {
|
|||||||
|
|
||||||
// if the player shift clicks, send them this warning
|
// if the player shift clicks, send them this warning
|
||||||
if (event.isShiftClick()) {
|
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);
|
event.getWhoClicked().sendMessage(component);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -69,10 +69,8 @@ public class VillagerTrade implements Listener {
|
|||||||
}
|
}
|
||||||
// if the player shift clicks, show the warning
|
// if the player shift clicks, show the warning
|
||||||
if (event.isShiftClick()) {
|
if (event.isShiftClick()) {
|
||||||
String configMessage = toolStats.config.getString("messages.shift-click-warning.trading");
|
Component component = toolStats.configTools.formatLore("shift-click-warning.trading", null, null);
|
||||||
if (configMessage != null) {
|
event.getWhoClicked().sendMessage(component);
|
||||||
player.sendMessage(ChatColor.translateAlternateColorCodes('&', configMessage));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
ItemStack newItem = addLore(item, player);
|
ItemStack newItem = addLore(item, player);
|
||||||
if (newItem != null) {
|
if (newItem != null) {
|
||||||
|
|||||||
@@ -107,7 +107,9 @@ public class ConfigTools {
|
|||||||
Component component;
|
Component component;
|
||||||
|
|
||||||
// set the placeholder to the value
|
// set the placeholder to the value
|
||||||
lore = lore.replace(placeHolder, String.valueOf(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
|
// if we match the old color codes, then format them as so
|
||||||
Matcher hexMatcher = CONFIG_HEX_PATTERN.matcher(lore);
|
Matcher hexMatcher = CONFIG_HEX_PATTERN.matcher(lore);
|
||||||
|
|||||||
Reference in New Issue
Block a user