Ensure quest name is not null or empty, fixes #370

This commit is contained in:
HappyPikachu 2018-04-20 10:59:44 -04:00
parent ac899a7c8c
commit d8efb37a61

View File

@ -1655,6 +1655,10 @@ public class Quester {
data.set("quest-points", questPoints);
ConfigurationSection dataSec = data.createSection("questData");
for (Quest quest : currentQuests.keySet()) {
if (quest.name == null || quest.name.isEmpty()) {
plugin.getLogger().severe("Quest name was null or empty while loading data");
return null;
}
ConfigurationSection questSec = dataSec.createSection(quest.name);
QuestData questData = getQuestData(quest);
if (questData == null)