From fea4be016197b61134af039ff4e2524029161ffe Mon Sep 17 00:00:00 2001 From: sk89q Date: Tue, 4 Jan 2011 14:42:44 -0800 Subject: [PATCH] Further fixed permissions. --- .../sk89q/worldedit/WorldEditController.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/com/sk89q/worldedit/WorldEditController.java b/src/com/sk89q/worldedit/WorldEditController.java index e874ea1b6..d08902ac5 100644 --- a/src/com/sk89q/worldedit/WorldEditController.java +++ b/src/com/sk89q/worldedit/WorldEditController.java @@ -643,7 +643,7 @@ public class WorldEditController { // Single super pickaxe mode } else if (split[0].equalsIgnoreCase("/single")) { - if (!canUseCommand(player, "//")) { + if (!canUseCommand(player, "/")) { player.printError("You don't have permission for super pickaxe usage."); return true; } @@ -658,7 +658,7 @@ public class WorldEditController { } else if (split[0].equalsIgnoreCase("/area") || split[0].equalsIgnoreCase("/recur")) { - if (!canUseCommand(player, "//")) { + if (!canUseCommand(player, "/")) { player.printError("You don't have permission for super pickaxe usage."); return true; } @@ -1733,7 +1733,7 @@ public class WorldEditController { * @param player */ public void handleArmSwing(LocalPlayer player) { - if (!canUseCommand(player, "//")) + if (!canUseCommand(player, "/")) return; } @@ -1751,12 +1751,12 @@ public class WorldEditController { // This prevents needless sessions from being created if (!hasSession(player) && !(itemInHand == config.wandItem && - canUseCommand(player, "//pos2"))) { return false; } + canUseCommand(player, "/pos2"))) { return false; } LocalSession session = getSession(player); if (itemInHand == config.wandItem && session.isToolControlEnabled() - && canUseCommand(player, "//pos2")) { + && canUseCommand(player, "/pos2")) { session.setPos2(clicked); try { player.print("Second position set to " + clicked @@ -1785,8 +1785,8 @@ public class WorldEditController { public boolean handleBlockLeftClick(LocalPlayer player, LocalWorld world, Vector clicked) { - if (!canUseCommand(player, "//pos1") - && !canUseCommand(player, "//")) { return false; } + if (!canUseCommand(player, "/pos1") + && !canUseCommand(player, "/")) { return false; } LocalSession session = getSession(player); @@ -1961,10 +1961,10 @@ public class WorldEditController { */ private boolean canUseCommand(LocalPlayer player, String command) { // Allow the /worldeditselect permission - if (command.equalsIgnoreCase("//pos1") - || command.equalsIgnoreCase("//pos2") - || command.equalsIgnoreCase("//hpos1") - || command.equalsIgnoreCase("//hpos2")) { + if (command.equalsIgnoreCase("/pos1") + || command.equalsIgnoreCase("/pos2") + || command.equalsIgnoreCase("/hpos1") + || command.equalsIgnoreCase("/hpos2")) { return player.hasPermission(command) || player.hasPermission("worldeditselect") || player.hasPermission("worldedit");