Some safety protection to loading bad Quester data

This commit is contained in:
Nathan Wolf 2016-01-22 12:05:38 -08:00
parent c2e252f539
commit d9b0acd73f

View File

@ -2590,7 +2590,7 @@ public class Quester {
ConfigurationSection dataSec = data.getConfigurationSection("questData");
if (dataSec.getKeys(false).isEmpty()) {
if (dataSec == null || dataSec.getKeys(false).isEmpty()) {
return false;
}
@ -2610,11 +2610,13 @@ public class Quester {
if (stage == null) {
quest.completeQuest(this);
plugin.getLogger().log(Level.SEVERE, "[Quests] Invalid stage number for player: \"" + id + "\" on Quest \"" + quest.name + "\". Quest ended.");
return true;
continue;
}
addEmpties(quest);
if (questSec == null) continue;
if (questSec.contains("blocks-damaged-names")) {
List<String> names = questSec.getStringList("blocks-damaged-names");