Run finish action if not last stage and has delay, fixes #1445

This commit is contained in:
PikaMug 2020-11-12 23:03:29 -05:00
parent 4ed540618d
commit a8b8e7b1a4

View File

@ -37,13 +37,13 @@ public class StageTimer implements Runnable {
return;
}
if (quester.getQuestData(quest).isDelayOver()) {
if (quester.getCurrentStage(quest).getFinishAction() != null) {
quester.getCurrentStage(quest).getFinishAction().fire(quester, quest);
}
if (quest.getStages().indexOf(quester.getCurrentStage(quest)) == (quest.getStages().size() - 1)) {
if (quester.getCurrentStage(quest).getScript() != null) {
plugin.getDependencies().runDenizenScript(quester.getCurrentStage(quest).getScript(), quester);
}
if (quester.getCurrentStage(quest).getFinishAction() != null) {
quester.getCurrentStage(quest).getFinishAction().fire(quester, quest);
}
quest.completeQuest(quester);
} else {
final int stageNum = quester.getCurrentQuests().get(quest) + 1;