diff options
| author | Krakenied <krakenied1@gmail.com> | 2024-11-16 02:34:28 +0100 |
|---|---|---|
| committer | Krakenied <46192742+Krakenied@users.noreply.github.com> | 2025-05-13 20:34:15 +0200 |
| commit | b60efbc8b39f93f04643d0fc05ff88cfccae489b (patch) | |
| tree | 945c3de9d7dd827218c8b4f4c31c06238085a44a /bukkit/src | |
| parent | 02680da3fb60f6fc758a9de326a5a7d4989f4067 (diff) | |
Make the counts towards completed option actually usable
That entire placeholder mess needs to be rewritten though
Diffstat (limited to 'bukkit/src')
| -rw-r--r-- | bukkit/src/main/java/com/leonardobishop/quests/bukkit/hook/papi/QuestsPlaceholders.java | 2 |
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": |
