mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-23 19:15:49 +01:00
Show readable console error for null stage, fixes #665
This commit is contained in:
parent
c8efb7d31c
commit
8c303d6b8b
@ -2013,6 +2013,10 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
|
||||
private void loadCustomSections(Quest quest, FileConfiguration config, String questKey) throws StageFailedException, SkipQuest {
|
||||
ConfigurationSection questStages = config.getConfigurationSection("quests." + questKey + ".stages.ordered");
|
||||
for (String s2 : questStages.getKeys(false)) {
|
||||
if (quest.getStage(Integer.valueOf(s2) - 1) == null) {
|
||||
getLogger().severe("Unable to load custom objectives because stage" + (Integer.valueOf(s2) - 1) + " for " + quest.getName() + " was null");
|
||||
return;
|
||||
}
|
||||
Stage oStage = quest.getStage(Integer.valueOf(s2) - 1);
|
||||
oStage.customObjectives=new LinkedList<>();
|
||||
oStage.customObjectiveCounts=new LinkedList<>();
|
||||
|
Loading…
Reference in New Issue
Block a user