diff --git a/src/main/java/me/blackvein/quests/Quester.java b/src/main/java/me/blackvein/quests/Quester.java index 6f011e6f7..0ec1885f7 100644 --- a/src/main/java/me/blackvein/quests/Quester.java +++ b/src/main/java/me/blackvein/quests/Quester.java @@ -2064,12 +2064,9 @@ public class Quester { LinkedList locations = new LinkedList(); List 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 has = questSec.getBooleanList("has-reached-location"); List 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();