aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLMBishop <13875753+LMBishop@users.noreply.github.com>2021-05-23 18:53:52 +0100
committerLMBishop <13875753+LMBishop@users.noreply.github.com>2021-05-23 18:53:52 +0100
commit3aaecb4b29e73ede01448a41db28d03e8bea8419 (patch)
treeb8ee63739956f9ebfb54ef85efe53d61685cdce6 /src
parent77d2f4f4beeb179b44f4af63b2ffba4b7caedfc0 (diff)
Fix missing world validation in mining task type
- Closes #169
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/leonardobishop/quests/quests/tasktypes/types/MiningCertainTaskType.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/leonardobishop/quests/quests/tasktypes/types/MiningCertainTaskType.java b/src/main/java/com/leonardobishop/quests/quests/tasktypes/types/MiningCertainTaskType.java
index 9fe54d7d..938fa9bd 100644
--- a/src/main/java/com/leonardobishop/quests/quests/tasktypes/types/MiningCertainTaskType.java
+++ b/src/main/java/com/leonardobishop/quests/quests/tasktypes/types/MiningCertainTaskType.java
@@ -100,6 +100,8 @@ public final class MiningCertainTaskType extends TaskType {
QuestProgress questProgress = qPlayer.getQuestProgressFile().getQuestProgress(quest);
for (Task task : quest.getTasksOfType(super.getType())) {
+ if (!TaskUtils.validateWorld(event.getPlayer(), task)) continue;
+
TaskProgress taskProgress = questProgress.getTaskProgress(task.getId());
if (taskProgress.isCompleted()) {
@@ -132,8 +134,6 @@ public final class MiningCertainTaskType extends TaskType {
QuestProgress questProgress = qPlayer.getQuestProgressFile().getQuestProgress(quest);
for (Task task : quest.getTasksOfType(super.getType())) {
- if (!TaskUtils.validateWorld(event.getPlayer(), task)) continue;
-
TaskProgress taskProgress = questProgress.getTaskProgress(task.getId());
if (taskProgress.isCompleted()) {