is checking player permission resource intensive

if on every BlockBreakEvent i check permission, would it cause lag?
14 Replies
Admincraft Meta
Admincraft Meta8mo ago
Thanks for asking your question!
Make sure to provide as much helpful information as possible such as logs/what you tried and what your exact issue is
Make sure to mark solved when issue is solved!!!
/close !close !solved !answered
Requested by djarda2#0
djarda2
djarda2OP8mo ago
i have luckperms
NieGestorben
NieGestorben8mo ago
Depends how many players you have. It might cause lag but usually permission checks are not very performance intensive The question is why should you do that Im sure there is a better solution to your problem than doing that Doing what you want sounds like a bad solution to the underlying problem https://xyproblem.info/
Lunaiskey
Lunaiskey8mo ago
mind explaining what you are checking the perm for?
Arthurmeade12
Arthurmeade128mo ago
Worldguard may be able to do something similar
Lunaiskey
Lunaiskey8mo ago
tbh i think worldguard does a permission check anyways so its probs not very intensive if a simple perm check was intensive then we are fucked
djarda2
djarda2OP8mo ago
if player breaks block and has no permission he wont get special drop if has permission he will get special drop i will add special drink Miners Drink that give permission temporary on drink that give bonus on break blocks
Lunaiskey
Lunaiskey8mo ago
why not implement ur own potion effects and check for that instead of giving a player a permission temporarily?
djarda2
djarda2OP8mo ago
my server is 1.20.4, is that supported on it
Lunaiskey
Lunaiskey8mo ago
dont think you can actually add ur own potion effects but you can simulate it
djarda2
djarda2OP8mo ago
ok good that would be faster maybe weakness 3
Arthurmeade12
Arthurmeade128mo ago
Or luck That's impossible to get in survival anyway
djarda2
djarda2OP8mo ago
ok
hawtre
hawtre8mo ago
If you're writing a plugin you could just listen for PlayerItemConsumeEvent and store it in a cache with a duration You wouldn't need to key it off a particular potion effect or anything

Did you find this page helpful?