Skip to content

Commit

Permalink
Fix /sell and /worth messages displaying {1} instead of the item(s) v…
Browse files Browse the repository at this point in the history
  • Loading branch information
JRoy authored and Chew committed Nov 25, 2020
1 parent 6bb3f3a commit 7a1b882
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,11 @@ public void run(final Server server, final User user, final String commandLabel,
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));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,12 @@ public void run(final Server server, final User user, final String commandLabel,
}
}
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));
}
}

Expand Down

0 comments on commit 7a1b882

Please sign in to comment.