mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2024-10-01 06:13:13 +00:00
Fix /sell and /worth messages displaying {1} instead of the item(s) value (#3656)
This commit is contained in:
parent
dc6b9b89cd
commit
4d2fbd04c5
|
@ -80,10 +80,11 @@ public class Commandsell extends EssentialsCommand {
|
||||||
ess.showError(user.getSource(), new Exception(tl("cannotSellTheseNamedItems", String.join(ChatColor.RESET + ", ", names))), commandLabel);
|
ess.showError(user.getSource(), new Exception(tl("cannotSellTheseNamedItems", String.join(ChatColor.RESET + ", ", names))), commandLabel);
|
||||||
}
|
}
|
||||||
if (count != 1) {
|
if (count != 1) {
|
||||||
|
String totalWorthStr = NumberUtil.displayCurrency(totalWorth, ess);
|
||||||
if (args[0].equalsIgnoreCase("blocks")) {
|
if (args[0].equalsIgnoreCase("blocks")) {
|
||||||
user.sendMessage(tl("totalWorthBlocks", NumberUtil.displayCurrency(totalWorth, ess)));
|
user.sendMessage(tl("totalWorthBlocks", totalWorthStr, totalWorthStr));
|
||||||
} else {
|
} else {
|
||||||
user.sendMessage(tl("totalWorthAll", NumberUtil.displayCurrency(totalWorth, ess)));
|
user.sendMessage(tl("totalWorthAll", totalWorthStr, totalWorthStr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,11 +46,12 @@ public class Commandworth extends EssentialsCommand {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (count > 1) {
|
if (count > 1) {
|
||||||
|
String totalWorthStr = NumberUtil.displayCurrency(totalWorth, ess);
|
||||||
if (args.length > 0 && args[0].equalsIgnoreCase("blocks")) {
|
if (args.length > 0 && args[0].equalsIgnoreCase("blocks")) {
|
||||||
user.sendMessage(tl("totalSellableBlocks", NumberUtil.displayCurrency(totalWorth, ess)));
|
user.sendMessage(tl("totalSellableBlocks", totalWorthStr, totalWorthStr));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
user.sendMessage(tl("totalSellableAll", NumberUtil.displayCurrency(totalWorth, ess)));
|
user.sendMessage(tl("totalSellableAll", totalWorthStr, totalWorthStr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue