From 6f8d1d3bd8cefe7ec75bd568b5c5a7586ff1db08 Mon Sep 17 00:00:00 2001 From: Krakenied Date: Sun, 18 Jan 2026 14:32:24 +0100 Subject: Add placeholder for player quest limit --- .../leonardobishop/quests/bukkit/hook/papi/QuestsPlaceholders.java | 5 +++++ docs/tools/placeholderapi.md | 1 + 2 files changed, 6 insertions(+) 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 26b78f22..1ea8f951 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 @@ -1,6 +1,7 @@ package com.leonardobishop.quests.bukkit.hook.papi; import com.leonardobishop.quests.bukkit.BukkitQuestsPlugin; +import com.leonardobishop.quests.bukkit.config.BukkitQuestsConfig; import com.leonardobishop.quests.bukkit.menu.itemstack.QItemStack; import com.leonardobishop.quests.bukkit.util.FormatUtils; import com.leonardobishop.quests.bukkit.util.Messages; @@ -105,6 +106,10 @@ public class QuestsPlaceholders extends PlaceholderExpansion implements Cacheabl final List listStarted = qPlayer.getEffectiveStartedQuests(); result = (args.length == 1 ? String.valueOf(listStarted.size()) : parseList(listStarted, args[1], split)); break; + case "limit": + case "l": + result = String.valueOf(((BukkitQuestsConfig) plugin.getQuestsConfig()).getQuestLimit(p)); + break; case "categories": if (args.length == 1) { result = String.valueOf(plugin.getQuestManager().getCategories().size()); diff --git a/docs/tools/placeholderapi.md b/docs/tools/placeholderapi.md index 40f377c7..fb5c23f0 100644 --- a/docs/tools/placeholderapi.md +++ b/docs/tools/placeholderapi.md @@ -34,6 +34,7 @@ The eCloud extension called 'Quests' is not for this plugin, do not download it! | `%quests_completed%` | **\*** Returns the **number** of quests the player has completed. | | `%quests_completedbefore%` | Returns the **number** of quests the player has completed **at least once**. | | `%quests_started%` | Returns the **number** of quests which are active for the player. | +| `%quests_limit%` | Returns the **number** of quests the player can have started simultaneously. | | `%quests_categories%` | Returns the **number** of categories on the server. | ### Quest lists -- cgit v1.2.3-70-g09d2