From 4ea629628d950d528ad39ed60ba0d2bad4489720 Mon Sep 17 00:00:00 2001 From: Chris Ward Date: Sat, 19 Oct 2013 21:40:01 +1100 Subject: [PATCH] Use a player's real name in /balance if they are vanished --- .../src/com/earth2me/essentials/commands/Commandbalance.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbalance.java b/Essentials/src/com/earth2me/essentials/commands/Commandbalance.java index 09b661191..8db3d6816 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandbalance.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandbalance.java @@ -24,7 +24,7 @@ public class Commandbalance extends EssentialsCommand } 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 @@ -34,7 +34,7 @@ public class Commandbalance extends EssentialsCommand { final User target = getPlayer(server, args, 0, true, true); 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) {