Remove old navigation perms for jumpto and thru

This commit is contained in:
Wizjany 2012-12-24 01:42:55 -05:00
parent e4771416aa
commit 3f9404560e
2 changed files with 4 additions and 17 deletions

View File

@ -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;
}

View File

@ -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);