mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-03 15:08:18 +01: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);
|
||||
}
|
||||
if (count != 1) {
|
||||
String totalWorthStr = NumberUtil.displayCurrency(totalWorth, ess);
|
||||
if (args[0].equalsIgnoreCase("blocks")) {
|
||||
user.sendMessage(tl("totalWorthBlocks", NumberUtil.displayCurrency(totalWorth, ess)));
|
||||
user.sendMessage(tl("totalWorthBlocks", totalWorthStr, totalWorthStr));
|
||||
} 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) {
|
||||
String totalWorthStr = NumberUtil.displayCurrency(totalWorth, ess);
|
||||
if (args.length > 0 && args[0].equalsIgnoreCase("blocks")) {
|
||||
user.sendMessage(tl("totalSellableBlocks", NumberUtil.displayCurrency(totalWorth, ess)));
|
||||
user.sendMessage(tl("totalSellableBlocks", totalWorthStr, totalWorthStr));
|
||||
return;
|
||||
}
|
||||
user.sendMessage(tl("totalSellableAll", NumberUtil.displayCurrency(totalWorth, ess)));
|
||||
user.sendMessage(tl("totalSellableAll", totalWorthStr, totalWorthStr));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user