From 2f17d56c402f5706cbcffcd12764850518593286 Mon Sep 17 00:00:00 2001 From: Ka0rX Date: Sun, 2 Apr 2023 18:29:14 +0100 Subject: [PATCH] Fixed bug #772 about trigger at the end of a quest to launch a new one. --- .../java/net/Indyuce/mmocore/api/quest/QuestProgress.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/quest/QuestProgress.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/quest/QuestProgress.java index 99abb972..92e8a6f5 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/quest/QuestProgress.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/quest/QuestProgress.java @@ -47,8 +47,6 @@ public class QuestProgress { objective++; objectiveProgress.close(); - // apply triggers - objectiveProgress.getObjective().getTriggers().forEach(trigger -> trigger.schedule(getPlayer())); // end quest if (objective >= quest.getObjectives().size()) @@ -57,6 +55,10 @@ public class QuestProgress { objectiveProgress = nextObjective().newProgress(this); player.getQuestData().updateBossBar(); + + + // apply triggers at the end so the quest is ended when a trigger quest start is launched. + objectiveProgress.getObjective().getTriggers().forEach(trigger -> trigger.schedule(getPlayer())); } public String getFormattedLore() {