aboutsummaryrefslogtreecommitdiffstats
path: root/common/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'common/src/main')
-rw-r--r--common/src/main/java/com/leonardobishop/quests/common/quest/Quest.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/common/src/main/java/com/leonardobishop/quests/common/quest/Quest.java b/common/src/main/java/com/leonardobishop/quests/common/quest/Quest.java
index 6a591e1d..7f2a583f 100644
--- a/common/src/main/java/com/leonardobishop/quests/common/quest/Quest.java
+++ b/common/src/main/java/com/leonardobishop/quests/common/quest/Quest.java
@@ -20,6 +20,7 @@ public class Quest implements Comparable<Quest> {
private List<String> requirements;
private List<String> rewardString;
private List<String> startString;
+ private List<String> startCommands;
private boolean repeatEnabled;
private boolean cooldownEnabled;
private int cooldown;
@@ -146,6 +147,16 @@ public class Quest implements Comparable<Quest> {
}
/**
+ * Get the start commands for this quest.
+ * The start commands is a list of commands to be executed upon starting the quest.
+ *
+ * @return immutable list of commands
+ */
+ public List<String> getStartCommands() {
+ return Collections.unmodifiableList(startCommands);
+ }
+
+ /**
* Get if this quest can be repeated after completion.
*
* @return boolean
@@ -231,6 +242,7 @@ public class Quest implements Comparable<Quest> {
private List<String> requirements = Collections.emptyList();
private List<String> rewardString = Collections.emptyList();
private List<String> startString = Collections.emptyList();
+ private List<String> startCommands = Collections.emptyList();
private boolean repeatEnabled = false;
private boolean cooldownEnabled = false;
private int cooldown = 0;
@@ -264,6 +276,11 @@ public class Quest implements Comparable<Quest> {
return this;
}
+ public Builder withStartCommands(List<String> startCommands) {
+ this.startCommands = startCommands;
+ return this;
+ }
+
public Builder withSortOrder(int sortOrder) {
this.sortOrder = sortOrder;
return this;
@@ -311,6 +328,7 @@ public class Quest implements Comparable<Quest> {
quest.requirements = this.requirements;
quest.rewardString = this.rewardString;
quest.startString = this.startString;
+ quest.startCommands = this.startCommands;
quest.repeatEnabled = this.repeatEnabled;
quest.cooldownEnabled = this.cooldownEnabled;
quest.cooldown = this.cooldown;