summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFearFree <fearfree@cubetown.net>2014-03-07 09:15:30 -0600
committerKHobbits <rob@khobbits.co.uk>2014-03-09 17:01:31 +0000
commit41faf1df89609775e71824af46efd37dc2eb6132 (patch)
tree28d517f96e1f88e0a019ee58f94a6864f88235f1
parent042b688eab2a92274888fa0701967f0cdb683153 (diff)
downloadEssentials-41faf1df89609775e71824af46efd37dc2eb6132.tar
Essentials-41faf1df89609775e71824af46efd37dc2eb6132.tar.gz
Essentials-41faf1df89609775e71824af46efd37dc2eb6132.tar.lz
Essentials-41faf1df89609775e71824af46efd37dc2eb6132.tar.xz
Essentials-41faf1df89609775e71824af46efd37dc2eb6132.zip
Remove op and replace with permission
-rw-r--r--Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java6
1 files 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;
}