summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2013-05-12 21:19:54 +0100
committerKHobbits <rob@khobbits.co.uk>2013-05-12 21:19:54 +0100
commit174e12d897791dfc385451edbd56b33c3b7af26f (patch)
tree3cb9d349cf5f3934ea96294b63084eefb8bd278f
parentf157ebb3e9c296aa28404e1f8f891377125a5d33 (diff)
downloadEssentials-174e12d897791dfc385451edbd56b33c3b7af26f.tar
Essentials-174e12d897791dfc385451edbd56b33c3b7af26f.tar.gz
Essentials-174e12d897791dfc385451edbd56b33c3b7af26f.tar.lz
Essentials-174e12d897791dfc385451edbd56b33c3b7af26f.tar.xz
Essentials-174e12d897791dfc385451edbd56b33c3b7af26f.zip
Tweak /baltop to not show displaynames on vanished players.
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java b/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java
index b8ba3100b..ddb5a7157 100644
--- a/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java
+++ b/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java
@@ -117,7 +117,8 @@ public class Commandbalancetop extends EssentialsCommand
final BigDecimal userMoney = user.getMoney();
user.updateMoneyCache(userMoney);
totalMoney = totalMoney.add(userMoney);
- balances.put(user.getDisplayName(), userMoney);
+ final String name = user.isHidden() ? user.getName() : user.getDisplayName();
+ balances.put(name, userMoney);
}
}