aboutsummaryrefslogtreecommitdiffstats
path: root/bukkit
diff options
context:
space:
mode:
authorKrakenied <krakenied1@gmail.com>2024-11-16 02:34:28 +0100
committerKrakenied <46192742+Krakenied@users.noreply.github.com>2025-05-13 20:34:15 +0200
commitb60efbc8b39f93f04643d0fc05ff88cfccae489b (patch)
tree945c3de9d7dd827218c8b4f4c31c06238085a44a /bukkit
parent02680da3fb60f6fc758a9de326a5a7d4989f4067 (diff)
Make the counts towards completed option actually usable
That entire placeholder mess needs to be rewritten though
Diffstat (limited to 'bukkit')
-rw-r--r--bukkit/src/main/java/com/leonardobishop/quests/bukkit/hook/papi/QuestsPlaceholders.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/bukkit/src/main/java/com/leonardobishop/quests/bukkit/hook/papi/QuestsPlaceholders.java b/bukkit/src/main/java/com/leonardobishop/quests/bukkit/hook/papi/QuestsPlaceholders.java
index 7c988cba..1a533aab 100644
--- a/bukkit/src/main/java/com/leonardobishop/quests/bukkit/hook/papi/QuestsPlaceholders.java
+++ b/bukkit/src/main/java/com/leonardobishop/quests/bukkit/hook/papi/QuestsPlaceholders.java
@@ -88,11 +88,13 @@ public class QuestsPlaceholders extends PlaceholderExpansion implements Cacheabl
case "completed":
case "c":
final List<Quest> listCompleted = qPlayer.getQuestProgressFile().getAllQuestsFromProgress(QuestProgressFile.QuestsProgressFilter.COMPLETED);
+ listCompleted.removeIf(quest -> !quest.doesCountTowardsCompleted());
result = (args.length == 1 ? String.valueOf(listCompleted.size()) : parseList(listCompleted, args[1], split));
break;
case "completedbefore":
case "cb":
final List<Quest> listCompletedB = qPlayer.getQuestProgressFile().getAllQuestsFromProgress(QuestProgressFile.QuestsProgressFilter.COMPLETED_BEFORE);
+ listCompletedB.removeIf(quest -> !quest.doesCountTowardsCompleted());
result = (args.length == 1 ? String.valueOf(listCompletedB.size()) : parseList(listCompletedB, args[1], split));
break;
case "started":