From 3f9404560e1f59dfdd05b013967f43502fbc1a40 Mon Sep 17 00:00:00 2001 From: Wizjany Date: Mon, 24 Dec 2012 01:42:55 -0500 Subject: [PATCH] Remove old navigation perms for jumpto and thru --- src/main/java/com/sk89q/worldedit/WorldEdit.java | 6 ++---- .../worldedit/commands/NavigationCommands.java | 15 ++------------- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/WorldEdit.java b/src/main/java/com/sk89q/worldedit/WorldEdit.java index 8338552de..917ddb63b 100644 --- a/src/main/java/com/sk89q/worldedit/WorldEdit.java +++ b/src/main/java/com/sk89q/worldedit/WorldEdit.java @@ -1163,8 +1163,7 @@ public class WorldEdit { return false; } - if (!player.hasPermission("worldedit.navigation.jumpto.tool") - && !player.hasPermission("worldedit.navigation.jumpto")) { // TODO: Remove old permission + if (!player.hasPermission("worldedit.navigation.jumpto.tool") ){ return false; } @@ -1202,8 +1201,7 @@ public class WorldEdit { return false; } - if (!player.hasPermission("worldedit.navigation.thru.tool") - && !player.hasPermission("worldedit.navigation.thru")) { // TODO: Remove old permission + if (!player.hasPermission("worldedit.navigation.thru.tool")) { return false; } diff --git a/src/main/java/com/sk89q/worldedit/commands/NavigationCommands.java b/src/main/java/com/sk89q/worldedit/commands/NavigationCommands.java index 1018116a6..4c87c099f 100644 --- a/src/main/java/com/sk89q/worldedit/commands/NavigationCommands.java +++ b/src/main/java/com/sk89q/worldedit/commands/NavigationCommands.java @@ -30,7 +30,6 @@ import com.sk89q.worldedit.LocalPlayer; import com.sk89q.worldedit.LocalSession; import com.sk89q.worldedit.WorldEdit; import com.sk89q.worldedit.WorldEditException; -import com.sk89q.worldedit.WorldEditPermissionException; import com.sk89q.worldedit.WorldVector; /** @@ -144,14 +143,9 @@ public class NavigationCommands { min = 0, max = 0 ) - // @CommandPermissions("worldedit.navigation.thru.command") // TODO: Remove old permission + @CommandPermissions("worldedit.navigation.thru.command") public void thru(CommandContext args, LocalSession session, LocalPlayer player, EditSession editSession) throws WorldEditException { - if (!(player.hasPermission("worldedit.navigation.thru") || - player.hasPermission("worldedit.navigation.thru.command"))) { - throw new WorldEditPermissionException(); - } - if (player.passThroughForwardWall(6)) { player.print("Whoosh!"); } else { @@ -166,15 +160,10 @@ public class NavigationCommands { min = 0, max = 0 ) - // @CommandPermissions("worldedit.navigation.jumpto.command") //TODO: Remove old permission + @CommandPermissions("worldedit.navigation.jumpto.command") public void jumpTo(CommandContext args, LocalSession session, LocalPlayer player, EditSession editSession) throws WorldEditException { - if (!(player.hasPermission("worldedit.navigation.jumpto") || - player.hasPermission("worldedit.navigation.jumpto.command"))) { - throw new WorldEditPermissionException(); - } - WorldVector pos = player.getSolidBlockTrace(300); if (pos != null) { player.findFreePosition(pos);