How LuckPerms "predicts" permissions
This is not an issue, only something I was investigating for fun
I've been curious about how LuckPerms manages to "predict" permissions the server has available.
I made a very small single-file plugin to see this feature in action with just a single
Apparently before trying to execute the command, luckperms is not yet aware of this permission, however after trying it once and opening the editor, it does show as a possible permission to choose.
This suggest that they might be caching permissions when
I've been reading their repo for a while now, and learned a lot of how the plugin works but so far, no reference as how they resolve those permissions, closest I could find is
This post is mostly for curiosity, if anyone had the same question and managed to find an answer before me.
This is the example plugin I made to test this:
I've been curious about how LuckPerms manages to "predict" permissions the server has available.
I made a very small single-file plugin to see this feature in action with just a single
Permissible.hasPermission(String) function at the start of a command.Apparently before trying to execute the command, luckperms is not yet aware of this permission, however after trying it once and opening the editor, it does show as a possible permission to choose.
This suggest that they might be caching permissions when
Permissible.hasPermission(String) or similar functions are executed, however in their repo there isn't a clear reference to a cache on hasPermission, only on addPermission.I've been reading their repo for a while now, and learned a lot of how the plugin works but so far, no reference as how they resolve those permissions, closest I could find is
AsyncPermissionRegistry but there's nothing suggesting a possible cache.This post is mostly for curiosity, if anyone had the same question and managed to find an answer before me.
This is the example plugin I made to test this:
