mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-15 07:05:51 +01:00
Better loading for world names with spaces, fixes #285
This commit is contained in:
parent
487e6d790f
commit
ee986cbf77
@ -2064,12 +2064,9 @@ public class Quester {
|
||||
LinkedList<Location> locations = new LinkedList<Location>();
|
||||
List<Integer> radii = questSec.getIntegerList("mob-kill-location-radii");
|
||||
for (String loc : questSec.getStringList("mob-kill-locations")) {
|
||||
String[] info = loc.split(" ");
|
||||
double x = Double.parseDouble(info[1]);
|
||||
double y = Double.parseDouble(info[2]);
|
||||
double z = Double.parseDouble(info[3]);
|
||||
Location finalLocation = new Location(plugin.getServer().getWorld(info[0]), x, y, z);
|
||||
locations.add(finalLocation);
|
||||
if (Quests.getLocation(loc) != null) {
|
||||
locations.add(Quests.getLocation(loc));
|
||||
}
|
||||
}
|
||||
getQuestData(quest).locationsToKillWithin = locations;
|
||||
getQuestData(quest).radiiToKillWithin.clear();
|
||||
@ -2109,12 +2106,9 @@ public class Quester {
|
||||
List<Boolean> has = questSec.getBooleanList("has-reached-location");
|
||||
List<Integer> radii = questSec.getIntegerList("radii-to-reach-within");
|
||||
for (String loc : questSec.getStringList("locations-to-reach")) {
|
||||
String[] info = loc.split(" ");
|
||||
double x = Double.parseDouble(info[1]);
|
||||
double y = Double.parseDouble(info[2]);
|
||||
double z = Double.parseDouble(info[3]);
|
||||
Location finalLocation = new Location(plugin.getServer().getWorld(info[0]), x, y, z);
|
||||
locations.add(finalLocation);
|
||||
if (Quests.getLocation(loc) != null) {
|
||||
locations.add(Quests.getLocation(loc));
|
||||
}
|
||||
}
|
||||
getQuestData(quest).locationsReached = locations;
|
||||
getQuestData(quest).hasReached.clear();
|
||||
|
Loading…
Reference in New Issue
Block a user