From 36cb577b6fb5c6f8f529627879eeebf6d05061a6 Mon Sep 17 00:00:00 2001 From: fatpigsarefat Date: Sun, 17 Mar 2019 12:45:06 +0000 Subject: Workaround for ghost 'mining' tasks in quest data files - During the quest completer task, each task in the quest will be checked against their task progress instead of checking only the task progresses. --- src/main/java/com/leonardobishop/quests/Quests.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/main/java/com/leonardobishop') diff --git a/src/main/java/com/leonardobishop/quests/Quests.java b/src/main/java/com/leonardobishop/quests/Quests.java index e23e6fe8..e1acd4a3 100644 --- a/src/main/java/com/leonardobishop/quests/Quests.java +++ b/src/main/java/com/leonardobishop/quests/Quests.java @@ -200,8 +200,9 @@ public class Quests extends JavaPlugin { QuestProgress questProgress = questProgressFile.getQuestProgress(quest); if (questProgress != null && questProgress.isStarted()) { boolean complete = true; - for (TaskProgress taskProgress : questProgress.getTaskProgress()) { - if (!taskProgress.isCompleted()) { + for (Task task : quest.getTasks()) { + TaskProgress taskProgress; + if ((taskProgress = questProgress.getTaskProgress(task.getId())) == null || !taskProgress.isCompleted()) { complete = false; break; } -- cgit v1.2.3-70-g09d2