Cancel loading if main section marker is missing, fixes #676

This commit is contained in:
BuildTools 2019-02-03 21:48:52 -05:00
parent 7aef0a7c75
commit 9e547e56da

View File

@ -862,6 +862,10 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
questsSection = config.createSection("quests");
needsSaving = true;
}
if (questsSection == null) {
getLogger().severe("Missing \'quests\' section marker within quests.yml, canceled loading");
return;
}
for (String questKey : questsSection.getKeys(false)) {
try { // main "skip quest" try/catch block
Quest quest = new Quest();