x = Double.parseDouble(parts[0]);
y = Double.parseDouble(parts[1]);
z = Double.parseDouble(parts[2]);
break;
default:
throw new CommandException("Location could not be parsed or was not found.");
}
World world = Bukkit.getWorld(worldName);
if (world == null)
throw new CommandException("Location could not be parsed or was not found.");
return new Location(world, x, y, z, yaw, pitch);
} else {
Player search = Bukkit.getPlayerExact(flag);
if (search == null)
throw new CommandException("No player could be found by that name.");
return search.getLocation();
}
}