So after a long time forgetting to do this, I've finally got to it.
Added 2 new config options. These options together make the new Placeholder Cache. Every # ticks (option update-interval), the placeholders from the list (option placeholders) will be parsed for every player online and saved/cached. This means whenever you use a quit message like:
- '[BROADCAST] &8[&c-&8] &e%luckperms_prefix% &b%player_name%'
It will first look in the cache and see if the message contains cached placeholders and it will replace them with the last cached value then it will parse the rest of the placeholders directly thru PlaceholderAPI.
This option is mostly to fix some placeholders not working in the quit formats and the update-interval can be set to just a few ticks for most people.
A few notes:
- The placeholder list is case sensitive
- The update interval doesn't change until the server is restarted
- This is only really needed for placeholders that only work with a Player as other placeholders that work with both OfflinePlayer and null will still parse just fine.
New config options:
# actions. This is mainly to fix issues with some placeholders not working when a player leaves.
placeholder-cache:
# The interval in ticks to refresh the placeholder cache. 20 ticks = 1 second.
# If you change this value, the server will need to be restarted to apply the changes.
update-interval: 10
# List of placeholders that should be cached. The list does update on /fjoin reload.
placeholders:
- "%luckperms_prefix%"