Remove op and replace with permission

This commit is contained in:
FearFree 2014-03-07 09:15:30 -06:00 committed by KHobbits
parent 1be30e4a0a
commit c59a204827
1 changed files with 4 additions and 2 deletions

View File

@ -12,8 +12,9 @@ import java.util.*;
import java.util.Map.Entry;
import java.util.concurrent.locks.ReentrantReadWriteLock;
import org.bukkit.Server;
import org.bukkit.entity.Player;
//TODO: Remove op and replace with perm
public class Commandbalancetop extends EssentialsCommand
{
public Commandbalancetop()
@ -39,7 +40,8 @@ public class Commandbalancetop extends EssentialsCommand
}
catch (NumberFormatException ex)
{
if (args[0].equalsIgnoreCase("force") && sender.getSender().isOp())
if (args[0].equalsIgnoreCase("force")
&& (!sender.isPlayer() || ess.getUser(sender.getPlayer()).isAuthorized("essentials.balancetop.force")))
{
force = true;
}