diff options
-rw-r--r-- | Essentials/src/com/earth2me/essentials/User.java | 4 | ||||
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java | 26 |
2 files changed, 18 insertions, 12 deletions
diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index afc59a3d1..99a4f389a 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -457,10 +457,6 @@ public class User extends UserData implements Comparable<User>, IReplyTo, net.es { if (ess.getSettings().isEcoDisabled()) { - if (ess.getSettings().isDebug()) - { - ess.getLogger().info("Internal economy functions disabled, aborting balance sync."); - } return; } if (ess.getPaymentMethod().hasMethod() && super.getMoney() != value) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java b/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java index e6a840998..87063bdd8 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java @@ -109,16 +109,26 @@ public class Commandbalancetop extends EssentialsCommand cache.getLines().clear(); final Map<String, BigDecimal> balances = new HashMap<String, BigDecimal>(); BigDecimal totalMoney = BigDecimal.ZERO; - for (String u : ess.getUserMap().getAllUniqueUsers()) + if (ess.getSettings().isEcoDisabled()) { - final User user = ess.getUserMap().getUser(u); - if (user != null) + if (ess.getSettings().isDebug()) { - final BigDecimal userMoney = user.getMoney(); - user.updateMoneyCache(userMoney); - totalMoney = totalMoney.add(userMoney); - final String name = user.isHidden() ? user.getName() : user.getDisplayName(); - balances.put(name, userMoney); + ess.getLogger().info("Internal economy functions disabled, aborting baltop."); + } + } + else + { + for (String u : ess.getUserMap().getAllUniqueUsers()) + { + final User user = ess.getUserMap().getUser(u); + if (user != null) + { + final BigDecimal userMoney = user.getMoney(); + user.updateMoneyCache(userMoney); + totalMoney = totalMoney.add(userMoney); + final String name = user.isHidden() ? user.getName() : user.getDisplayName(); + balances.put(name, userMoney); + } } } |