Add permission to check others' balances.

This commit is contained in:
AppleDash 2016-06-14 05:59:51 -04:00
parent 7ccc672f5d
commit 74234d4196

View File

@ -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);