mirror of
https://github.com/PikaMug/Quests.git
synced 2024-12-28 12:07:43 +01:00
Ensure quest is not null when loading custom sections, fixes #670
This commit is contained in:
parent
85edd09252
commit
f2d50198e1
@ -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 == null) {
|
||||
getLogger().severe("Unable to load custom objectives because quest for " + questKey + " was null");
|
||||
return;
|
||||
}
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user