From 5e6f6b2482f62f1d84147eed0f2dca295c80cec0 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Sun, 12 May 2013 21:19:54 +0100 Subject: [PATCH] Tweak /baltop to not show displaynames on vanished players. --- .../com/earth2me/essentials/commands/Commandbalancetop.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java b/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java index b8ba3100be..ddb5a7157e 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java @@ -117,7 +117,8 @@ public void run() 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); } }