From 46e37017bfab8661e978a842fd22f7886f80bc5d Mon Sep 17 00:00:00 2001 From: Wizjany Date: Wed, 10 Aug 2011 17:02:56 -0400 Subject: [PATCH] Whitespace police --- .../worldedit/commands/SelectionCommands.java | 74 ++++++++----------- 1 file changed, 32 insertions(+), 42 deletions(-) diff --git a/src/main/java/com/sk89q/worldedit/commands/SelectionCommands.java b/src/main/java/com/sk89q/worldedit/commands/SelectionCommands.java index 892858b56..9f36ae4e3 100644 --- a/src/main/java/com/sk89q/worldedit/commands/SelectionCommands.java +++ b/src/main/java/com/sk89q/worldedit/commands/SelectionCommands.java @@ -50,28 +50,22 @@ public class SelectionCommands { public static void pos1(CommandContext args, WorldEdit we, LocalSession session, LocalPlayer player, EditSession editSession) throws WorldEditException { - - Vector pos; - - if(args.argsLength() == 1) - { - if(args.getString(0).matches("-?\\d+,-?\\d+,-?\\d+")) - { - String[] coords = args.getString(0).split(","); - pos = new Vector(Integer.parseInt(coords[0]), - Integer.parseInt(coords[1]), - Integer.parseInt(coords[2])); - } - else - { - player.printError("Invalid coordinates " + args.getString(0)); - return; - } - } - else pos = player.getBlockIn(); - - if (!session.getRegionSelector(player.getWorld()) - .selectPrimary(pos)) { + + Vector pos; + + if (args.argsLength() == 1) { + if (args.getString(0).matches("-?\\d+,-?\\d+,-?\\d+")) { + String[] coords = args.getString(0).split(","); + pos = new Vector(Integer.parseInt(coords[0]), Integer.parseInt(coords[1]), Integer.parseInt(coords[2])); + } else { + player.printError("Invalid coordinates " + args.getString(0)); + return; + } + } else { + pos = player.getBlockIn(); + } + + if (!session.getRegionSelector(player.getWorld()).selectPrimary(pos)) { player.printError("Position already set."); return; } @@ -91,27 +85,23 @@ public class SelectionCommands { public static void pos2(CommandContext args, WorldEdit we, LocalSession session, LocalPlayer player, EditSession editSession) throws WorldEditException { - - Vector pos; - if(args.argsLength() == 1) - { - if(args.getString(0).matches("-?\\d+,-?\\d+,-?\\d+")) - { - String[] coords = args.getString(0).split(","); - pos = new Vector(Integer.parseInt(coords[0]), - Integer.parseInt(coords[1]), - Integer.parseInt(coords[2])); - } - else - { - player.printError("Invalid coordinates " + args.getString(0)); - return; - } - } - else pos = player.getBlockIn(); - if (!session.getRegionSelector(player.getWorld()) - .selectSecondary(pos)) { + Vector pos; + if(args.argsLength() == 1) { + if(args.getString(0).matches("-?\\d+,-?\\d+,-?\\d+")) { + String[] coords = args.getString(0).split(","); + pos = new Vector(Integer.parseInt(coords[0]), + Integer.parseInt(coords[1]), + Integer.parseInt(coords[2])); + } else { + player.printError("Invalid coordinates " + args.getString(0)); + return; + } + } else { + pos = player.getBlockIn(); + } + + if (!session.getRegionSelector(player.getWorld()).selectSecondary(pos)) { player.printError("Position already set."); return; }