So, I've wanted to add cooldown for using certain button in deluxemenus using meta. Just simply add an meta, and remove it after 5 minutes. If user has this meta -> he is on cooldown and cannot click it again. It is working fine, unless I restart server. DeluxeMenus is somehow saving the meta (but it doesn't have any save files inside DeluxeMenus dir.). Because of it, after restarting the server the tag <delay=6000> is not counting so it is not removing the meta, so the user is on infinite cooldown. How to prevent saving meta upon server restart? Or how to make it work.
#DeluxeMenus - question about meta
1 messages · Page 1 of 1 (latest)
If you use luckperms, you could give user a temporary permission
and then just do a check on that permission
also give that permission on the first click
i do this on my server for parkour checkpoints
Since this post was revived, DeluxeMenus meta just uses a feature from spigot called PersistentDataContainers. Basically the data is stored somewhere in the player-uuid.dat files in the world directory. If you are interested on how this works actually works at a development level, you can read more here: https://www.spigotmc.org/threads/a-guide-to-1-14-persistentdataholder-api.371200/