Whitespace police

This commit is contained in:
Wizjany 2011-08-10 17:02:56 -04:00
parent 7b306160d7
commit 46e37017bf

View File

@ -53,25 +53,19 @@ public class SelectionCommands {
Vector pos; Vector pos;
if(args.argsLength() == 1) if (args.argsLength() == 1) {
{ if (args.getString(0).matches("-?\\d+,-?\\d+,-?\\d+")) {
if(args.getString(0).matches("-?\\d+,-?\\d+,-?\\d+"))
{
String[] coords = args.getString(0).split(","); String[] coords = args.getString(0).split(",");
pos = new Vector(Integer.parseInt(coords[0]), pos = new Vector(Integer.parseInt(coords[0]), Integer.parseInt(coords[1]), Integer.parseInt(coords[2]));
Integer.parseInt(coords[1]), } else {
Integer.parseInt(coords[2]));
}
else
{
player.printError("Invalid coordinates " + args.getString(0)); player.printError("Invalid coordinates " + args.getString(0));
return; return;
} }
} else {
pos = player.getBlockIn();
} }
else pos = player.getBlockIn();
if (!session.getRegionSelector(player.getWorld()) if (!session.getRegionSelector(player.getWorld()).selectPrimary(pos)) {
.selectPrimary(pos)) {
player.printError("Position already set."); player.printError("Position already set.");
return; return;
} }
@ -93,25 +87,21 @@ public class SelectionCommands {
throws WorldEditException { throws WorldEditException {
Vector pos; Vector pos;
if(args.argsLength() == 1) if(args.argsLength() == 1) {
{ if(args.getString(0).matches("-?\\d+,-?\\d+,-?\\d+")) {
if(args.getString(0).matches("-?\\d+,-?\\d+,-?\\d+"))
{
String[] coords = args.getString(0).split(","); String[] coords = args.getString(0).split(",");
pos = new Vector(Integer.parseInt(coords[0]), pos = new Vector(Integer.parseInt(coords[0]),
Integer.parseInt(coords[1]), Integer.parseInt(coords[1]),
Integer.parseInt(coords[2])); Integer.parseInt(coords[2]));
} } else {
else
{
player.printError("Invalid coordinates " + args.getString(0)); player.printError("Invalid coordinates " + args.getString(0));
return; return;
} }
} else {
pos = player.getBlockIn();
} }
else pos = player.getBlockIn();
if (!session.getRegionSelector(player.getWorld()) if (!session.getRegionSelector(player.getWorld()).selectSecondary(pos)) {
.selectSecondary(pos)) {
player.printError("Position already set."); player.printError("Position already set.");
return; return;
} }