mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-18 08:35:44 +01:00
Implement essentials.balancetop.exclude permission (#2499)
Closes #595.
This commit is contained in:
parent
0e3f48ee54
commit
e9833d1cd2
@ -102,11 +102,13 @@ public class Commandbalancetop extends EssentialsCommand {
|
||||
// Don't list NPCs in output
|
||||
continue;
|
||||
}
|
||||
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);
|
||||
if (!user.isAuthorized("essentials.balancetop.exclude")) {
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user