}
String read = profiles.getString(UID + BasicProperties.waypoints);
if (!read.isEmpty()) {
for (String str : read.split(";")) {
String[] split = str.split(",");
temp.add(new Waypoint(new Location(world, Double.parseDouble(split[0]), Double
.parseDouble(split[1]), Double.parseDouble(split[2]))));
}
return temp;
}
String path = "", root = "";
WaypointModifier modifier = null;
for (int key : profiles.getIntegerKeys(UID + BasicProperties.waypoints)) {
root = UID + BasicProperties.waypoints + "." + key;
Waypoint waypoint = new Waypoint(LocationUtils.loadLocation(profiles, root, true));
waypoint.setDelay(profiles.getInt(root + ".delay"));
if (profiles.keyExists(root + ".modifiers")) {
root += ".modifiers";
for (int innerKey : profiles.getIntegerKeys(root)) {
path = root + "." + innerKey;
modifier = WaypointModifierType.valueOf(profiles.getString(path + ".type")).create(
waypoint);
modifier.parse(profiles, path);
waypoint.addModifier(modifier);
}
}
temp.add(waypoint);
}
return temp;