From 7f659a8b4faf6040e16faf938e57a8228ea36fbd Mon Sep 17 00:00:00 2001 From: IronApollo Date: Mon, 15 Oct 2018 05:11:48 -0400 Subject: [PATCH] Added -f flag to bypass findFreePosition in jumpto --- .../com/sk89q/worldedit/command/NavigationCommands.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/com/sk89q/worldedit/command/NavigationCommands.java b/core/src/main/java/com/sk89q/worldedit/command/NavigationCommands.java index 5b103331..0946d6c2 100644 --- a/core/src/main/java/com/sk89q/worldedit/command/NavigationCommands.java +++ b/core/src/main/java/com/sk89q/worldedit/command/NavigationCommands.java @@ -168,7 +168,10 @@ public class NavigationCommands { @Command( aliases = {"jumpto", "j"}, usage = "[world,x,y,z]", - desc = "Teleport to a location", + desc = "Teleport to a location" + + "Flags:\n" + + " -f forces the specified position to be used", + flags = "f", min = 0, max = 1 ) @@ -189,7 +192,7 @@ public class NavigationCommands { pos = player.getSolidBlockTrace(300); } if (pos != null) { - player.findFreePosition(pos); + if(args.hasFlag('f')) player.setPosition(pos); else player.findFreePosition(pos); BBC.POOF.send(player); } else { BBC.NO_BLOCK.send(player);