diff options
| author | fatpigsarefat <fatpigsarefat@outlook.com> | 2019-03-17 12:45:06 +0000 |
|---|---|---|
| committer | fatpigsarefat <fatpigsarefat@outlook.com> | 2019-03-17 12:45:06 +0000 |
| commit | 36cb577b6fb5c6f8f529627879eeebf6d05061a6 (patch) | |
| tree | e800991f5460c73461f3f8f28b2c595de49381c2 | |
| parent | fc3b89203eeb1b291fc437f0ad7da574cc98bd6a (diff) | |
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.
| -rw-r--r-- | pom.xml | 2 | ||||
| -rw-r--r-- | src/main/java/com/leonardobishop/quests/Quests.java | 5 |
2 files changed, 4 insertions, 3 deletions
@@ -6,7 +6,7 @@ <groupId>com.leonardobishop</groupId> <artifactId>quests</artifactId> - <version>2.0.16</version> + <version>2.1.1</version> <name>Quests</name> <properties> 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; } |
