mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-14 14:45:41 +01:00
Some safety protection to loading bad Quester data
This commit is contained in:
parent
c2e252f539
commit
d9b0acd73f
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user