LMBishop / Quests

Questing plugin for Minecraft, enabling the addition of goals for players.
https://www.spigotmc.org/resources/23696/
GNU General Public License v3.0
170 stars 85 forks source link

Placeholders not working in GUI #303

Open majorflv opened 2 years ago

majorflv commented 2 years ago

Description of Bug

When you put a PlaceholderAPI placeholder into any part of the GUI, the placeholders do not work. This happens even when gui-use-placeholderapi: true and quests-use-placeholderapi: true.

Steps to Reproduce

quests2 quests3 quests4 quests5

Environment

Agreements

Other

No response

majorflv commented 2 years ago

I was able to get other placeholders to work (for example, %luckperms_prefix% works here) but the placeholder I need in this spot %luckperms_expiry_time_quests.quest.1test% does not work, I would assume it has something to do with the length of the placeholder?

LMBishop commented 2 years ago

I'm not sure what %luckperms_expiry_time_quests.quest.1test% is supposed to refer to? Quest placeholders can be accessed here: https://github.com/LMBishop/Quests/wiki/PlaceholderAPI#quest-details

majorflv commented 2 years ago

I am trying to do what someone else suggested should be added 2 years ago #46 <-- here and create category cooldowns. Essentially, when a player completes all quests in a category, the final quest runs a command (q a moddata reset {name} {questname}) removing the player's data from all the quests in that category. Another command removes the players permission to start the first quest in that category for 2 weeks lp user {player} permission settemp quests.quest.(first quest's name) false 2w.

In this case, the category was my 'test' quests and the first quest in that category was '1test'. The placeholder %luckperms_expiry_time_quests.quest.1test% is used to show players how long they have left until that permission expires and they are able to do the 'test' quests again (luckperms timed permission placeholder).

Everything I just described works fine except for the placeholder being put in the GUI at the end, which as you can see in the pictures I sent in the first message, will parse with PAPI but does not work with Quests. If you need more information or a better explanation feel free to message me on discord (majorflv#7974) and I will likely reply quickly or just respond here again.