1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-15 02:59:06 +02:00

Use a player's real name in /balance if they are vanished

This commit is contained in:
Chris Ward
2013-10-19 21:40:01 +11:00
committed by KHobbits
parent c55c0d6bdd
commit 200948bdd5

View File

@@ -24,7 +24,7 @@ public class Commandbalance extends EssentialsCommand
} }
User target = getPlayer(server, args, 0, true, true); User target = getPlayer(server, args, 0, true, true);
sender.sendMessage(_("balanceOther", target.getDisplayName(), NumberUtil.displayCurrency(target.getMoney(), ess))); sender.sendMessage(_("balanceOther", target.isHidden() ? target.getName() : target.getDisplayName(), NumberUtil.displayCurrency(target.getMoney(), ess)));
} }
@Override @Override
@@ -34,7 +34,7 @@ public class Commandbalance extends EssentialsCommand
{ {
final User target = getPlayer(server, args, 0, true, true); final User target = getPlayer(server, args, 0, true, true);
final BigDecimal bal = target.getMoney(); final BigDecimal bal = target.getMoney();
user.sendMessage(_("balanceOther", target.getDisplayName(), NumberUtil.displayCurrency(bal, ess))); user.sendMessage(_("balanceOther", target.isHidden() ? target.getName() : target.getDisplayName(), NumberUtil.displayCurrency(bal, ess)));
} }
else if (args.length < 2) else if (args.length < 2)
{ {