From 227b260fad2c0a0028b38a34ba104add87fe62bb Mon Sep 17 00:00:00 2001 From: BuildTools Date: Mon, 4 Mar 2019 20:27:25 -0500 Subject: [PATCH] Fire start event when advancing stage after delay, fixes #691 --- .../main/java/me/blackvein/quests/timers/StageTimer.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main/src/main/java/me/blackvein/quests/timers/StageTimer.java b/main/src/main/java/me/blackvein/quests/timers/StageTimer.java index 11c73b2ec..29a2cfc60 100644 --- a/main/src/main/java/me/blackvein/quests/timers/StageTimer.java +++ b/main/src/main/java/me/blackvein/quests/timers/StageTimer.java @@ -15,6 +15,7 @@ package me.blackvein.quests.timers; import org.bukkit.ChatColor; import org.bukkit.entity.Player; +import me.blackvein.quests.Event; import me.blackvein.quests.Quest; import me.blackvein.quests.Quester; import me.blackvein.quests.Quests; @@ -65,6 +66,10 @@ public class StageTimer implements Runnable { quester.getCurrentStage(quest).setDelay(-1); quester.getQuestData(quest).delayStartTime = 0; quester.getQuestData(quest).delayTimeLeft = -1; + Event stageStartEvent = quester.getCurrentStage(quest).getStartEvent(); + if (stageStartEvent != null) { + stageStartEvent.fire(quester, quest); + } Player player = quester.getPlayer(); String msg = Lang.get(player, "questObjectivesTitle"); msg = msg.replace("", quest.getName()); @@ -74,6 +79,7 @@ public class StageTimer implements Runnable { if (stageStartMessage != null) { quester.getPlayer().sendMessage(Quests.parseString(stageStartMessage, quest)); } + } if (quester.getQuestData(quest) != null) { quester.getQuestData(quest).delayOver = true;