diff options
| author | Krakenied <Krakenied1@gmail.com> | 2024-08-20 20:04:52 +0200 |
|---|---|---|
| committer | Krakenied <46192742+Krakenied@users.noreply.github.com> | 2024-08-28 11:37:11 +0200 |
| commit | e16d38633cec8c32900a1fee882f9eabbc1fd44b (patch) | |
| tree | b68a435e2edb6c552af9c3266498156184751cd8 /common/src/main/java | |
| parent | 121e5262293e7b139dcea42a2bcf4c1fe1a797e1 (diff) | |
Vault reward integration
Closes https://github.com/LMBishop/Quests/issues/708
Diffstat (limited to 'common/src/main/java')
| -rw-r--r-- | common/src/main/java/com/leonardobishop/quests/common/quest/Quest.java | 18 |
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 a3cc26f9..3194b504 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 @@ -25,6 +25,7 @@ public class Quest implements Comparable<Quest> { private List<String> startCommands; private List<String> cancelCommands; private List<String> expiryCommands; + private double vaultReward; private boolean repeatEnabled; private boolean cooldownEnabled; private int cooldown; @@ -206,6 +207,16 @@ public class Quest implements Comparable<Quest> { } /** + * Get the Vault reward for this quest. + * The Vault reward is an amount of Vault economy money to be given upon completing the quest. + * + * @return double + */ + public double getVaultReward() { + return this.vaultReward; + } + + /** * Get if this quest can be repeated after completion. * * @return boolean @@ -342,6 +353,7 @@ public class Quest implements Comparable<Quest> { private List<String> startCommands = Collections.emptyList(); private List<String> cancelCommands = Collections.emptyList(); private List<String> expiryCommands = Collections.emptyList(); + private double vaultReward = 0.0D; private boolean repeatEnabled = false; private boolean cooldownEnabled = false; private int cooldown = 0; @@ -405,6 +417,11 @@ public class Quest implements Comparable<Quest> { return this; } + public Builder withVaultReward(double vaultReward) { + this.vaultReward = vaultReward; + return this; + } + public Builder withSortOrder(int sortOrder) { this.sortOrder = sortOrder; return this; @@ -482,6 +499,7 @@ public class Quest implements Comparable<Quest> { quest.startCommands = this.startCommands; quest.cancelCommands = this.cancelCommands; quest.expiryCommands = this.expiryCommands; + quest.vaultReward = this.vaultReward; quest.repeatEnabled = this.repeatEnabled; quest.cooldownEnabled = this.cooldownEnabled; quest.cooldown = this.cooldown; |
