Merge pull request #657 from BerndiVader/master

renew custom linkedlists in stages on reload to apply possible changes
This commit is contained in:
FlyingPikachu 2019-01-26 17:11:57 -05:00 committed by GitHub
commit 1fbdf88092
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2014,6 +2014,10 @@ public class Quests extends JavaPlugin implements ConversationAbandonedListener
ConfigurationSection questStages = config.getConfigurationSection("quests." + questKey + ".stages.ordered");
for (String s2 : questStages.getKeys(false)) {
Stage oStage = quest.getStage(Integer.valueOf(s2) - 1);
oStage.customObjectives=new LinkedList<>();
oStage.customObjectiveCounts=new LinkedList<>();
oStage.customObjectiveData=new LinkedList<>();
oStage.customObjectiveDisplays=new LinkedList<>();
if (config.contains("quests." + questKey + ".stages.ordered." + s2 + ".custom-objectives")) {
ConfigurationSection sec = config.getConfigurationSection("quests." + questKey + ".stages.ordered." + s2 + ".custom-objectives");
for (String path : sec.getKeys(false)) {