From c59a2048278ea4422910cef9bccbea068d07b5b2 Mon Sep 17 00:00:00 2001 From: FearFree Date: Fri, 7 Mar 2014 09:15:30 -0600 Subject: Remove op and replace with permission --- .../src/com/earth2me/essentials/commands/Commandbalancetop.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java b/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java index f1e16fd51..18371df62 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java @@ -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; } -- cgit v1.2.3