Fixed parent quest loading

This commit is contained in:
Indyuce 2020-05-05 20:48:09 +02:00
parent de2dd1a2bf
commit ac17103be8

View File

@ -73,11 +73,7 @@ public class Quest extends PostLoadObject {
protected void whenPostLoaded(ConfigurationSection config) {
if (config.contains("parent"))
for (String parent : config.getStringList("parent"))
try {
parents.add(MMOCore.plugin.questManager.getOrThrow(parent));
} catch (NullPointerException exception) {
MMOCore.plugin.getLogger().log(Level.WARNING, "Couldn't find quest ID '" + parent + "'");
}
parents.add(MMOCore.plugin.questManager.getOrThrow(parent.toLowerCase().replace(" ", "-").replace("_", "-")));
}
public String getId() {