From ac17103be8b6d7b84c9c422f16b1ff0bceed940a Mon Sep 17 00:00:00 2001 From: Indyuce Date: Tue, 5 May 2020 20:48:09 +0200 Subject: [PATCH] Fixed parent quest loading --- src/main/java/net/Indyuce/mmocore/api/quest/Quest.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/java/net/Indyuce/mmocore/api/quest/Quest.java b/src/main/java/net/Indyuce/mmocore/api/quest/Quest.java index 02994910..cebb9e31 100644 --- a/src/main/java/net/Indyuce/mmocore/api/quest/Quest.java +++ b/src/main/java/net/Indyuce/mmocore/api/quest/Quest.java @@ -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() {