aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLMBishop <13875753+LMBishop@users.noreply.github.com>2021-06-08 22:09:31 +0100
committerLMBishop <13875753+LMBishop@users.noreply.github.com>2021-06-08 22:09:31 +0100
commit339c1e37abba4b4afa516927eba5fc1291f15bd9 (patch)
treef5b180628dca23565e5c1c4981b226866ac3de44
parentd08fa22615c64ad81e96ec19401182a3801ac5ca (diff)
Make quest track automatically track first quest
- Closes #173
-rw-r--r--src/main/java/com/leonardobishop/quests/player/QPlayer.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/java/com/leonardobishop/quests/player/QPlayer.java b/src/main/java/com/leonardobishop/quests/player/QPlayer.java
index 4e04566b..44472217 100644
--- a/src/main/java/com/leonardobishop/quests/player/QPlayer.java
+++ b/src/main/java/com/leonardobishop/quests/player/QPlayer.java
@@ -99,6 +99,14 @@ public class QPlayer {
player.sendMessage(ChatColor.translateAlternateColorCodes('&', s));
}
}
+ if ((Options.ALLOW_QUEST_TRACK.getBooleanValue() && Options.QUEST_AUTOTRACK.getBooleanValue() && !(quest.isRepeatable() && !quest.isCooldownEnabled()))
+ || (!Options.ALLOW_QUEST_TRACK.getBooleanValue() && Options.QUEST_AUTOTRACK.getBooleanValue())) {
+ Quest nextQuest;
+ if (questProgressFile.getStartedQuests().size() > 0) {
+ nextQuest = questProgressFile.getStartedQuests().get(0);
+ trackQuest(nextQuest);
+ }
+ }
return true;
}