aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/src/main/java/com/leonardobishop/quests/common/quest/Quest.java17
1 files changed, 17 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 f12c9a5f..22ba889d 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
@@ -26,6 +26,7 @@ public class Quest implements Comparable<Quest> {
private boolean cancellable;
private boolean countsTowardsLimit;
private Map<String, String> placeholders;
+ private Map<String, String> progressPlaceholders;
private String categoryid;
private Quest() { }
@@ -222,6 +223,15 @@ public class Quest implements Comparable<Quest> {
}
/**
+ * Get the local progress placeholders for this quest, which is not exposed to PlaceholderAPI.
+ *
+ * @return immutable map of progress placeholders
+ */
+ public @NotNull Map<String, String> getProgressPlaceholders() {
+ return Collections.unmodifiableMap(progressPlaceholders);
+ }
+
+ /**
* Get the sort order for this quest in the GUI.
* Numbers closer to Integer.MIN_VALUE have greater priority.
*
@@ -289,6 +299,7 @@ public class Quest implements Comparable<Quest> {
private boolean cancellable = true;
private boolean countsTowardsLimit = true;
private Map<String, String> placeholders = Collections.emptyMap();
+ private Map<String, String> progressPlaceholders = Collections.emptyMap();
private String categoryid = null;
public Builder(String id) {
@@ -340,6 +351,11 @@ public class Quest implements Comparable<Quest> {
return this;
}
+ public Builder withProgressPlaceholders(Map<String, String> progressPlaceholders) {
+ this.progressPlaceholders = progressPlaceholders;
+ return this;
+ }
+
public Builder withRepeatEnabled(boolean repeatEnabled) {
this.repeatEnabled = repeatEnabled;
return this;
@@ -399,6 +415,7 @@ public class Quest implements Comparable<Quest> {
quest.countsTowardsLimit = countsTowardsLimit;
quest.cancellable = this.cancellable;
quest.placeholders = this.placeholders;
+ quest.progressPlaceholders = this.progressPlaceholders;
quest.categoryid = this.categoryid;
return quest;