is checking player permission resource intensive
if on every BlockBreakEvent i check permission, would it cause lag?
14 Replies
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
i have luckperms
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/
mind explaining what you are checking the perm for?
Worldguard may be able to do something similar
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
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
why not implement ur own potion effects and check for that instead of giving a player a permission temporarily?
my server is 1.20.4, is that supported on it
dont think you can actually add ur own potion effects but you can simulate it
ok good that would be faster
maybe weakness 3
Or luck
That's impossible to get in survival anyway
ok
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