mirror of
https://github.com/AppleDash/SaneEconomy.git
synced 2024-09-27 14:12:58 +02:00
Add permission to check others' balances.
This commit is contained in:
parent
7ccc672f5d
commit
74234d4196
@ -38,6 +38,11 @@ public class BalanceCommand extends SaneEconomyCommand {
|
||||
playerName = sender.getName();
|
||||
} else {
|
||||
playerName = args[0];
|
||||
|
||||
if (!sender.hasPermission("saneeconomy.balance.other")) {
|
||||
MessageUtils.sendMessage(sender, "You don't have permission to check the balance of %s.", playerName);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Player player = Bukkit.getServer().getPlayer(playerName);
|
||||
|
Loading…
Reference in New Issue
Block a user