Skip to content

Commit 30cdbb2

Browse files
FearFreekhobbits
authored andcommitted
Remove op and replace with permission
1 parent 6511d5d commit 30cdbb2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Essentials/src/com/earth2me/essentials/commands/Commandbalancetop.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
import java.util.Map.Entry;
1313
import java.util.concurrent.locks.ReentrantReadWriteLock;
1414
import org.bukkit.Server;
15+
import org.bukkit.entity.Player;
16+
1517

16-
//TODO: Remove op and replace with perm
1718
public class Commandbalancetop extends EssentialsCommand
1819
{
1920
public Commandbalancetop()
@@ -39,7 +40,8 @@ protected void run(final Server server, final CommandSource sender, final String
3940
}
4041
catch (NumberFormatException ex)
4142
{
42-
if (args[0].equalsIgnoreCase("force") && sender.getSender().isOp())
43+
if (args[0].equalsIgnoreCase("force")
44+
&& (!sender.isPlayer() || ess.getUser(sender.getPlayer()).isAuthorized("essentials.balancetop.force")))
4345
{
4446
force = true;
4547
}

0 commit comments

Comments
 (0)