Permissions with context always set the value, even when they shouldn't
honnisha opened this issue ยท 4 comments
Description
Hi. I trying to create permission that would be true only if texture pack is loaded. I create context and its works correctly, but my permission true no matter which context is set.
- resporcepack-loaded:
value: true
context:
rp-loaded: loaded
I also tried gamemode with survival and creative. It always set the value.
Reproduction Steps
Any context return true
Expected Behaviour
My context is:
rp-status=unloaded
and i expect permission resporcepack-loaded
to be false.
Server Details
Purpur 1362 1.18.2
LuckPerms Version
v5.4.40
Logs and Configs
Commands
lp user BunnyHonni permission check resporcepack-loaded
lp info
lp user BunnyHonni info
https://gist.github.com/honnisha/c7f5488ddf35ea29b33674b5a7147d40
My default.yml group:
https://gist.github.com/honnisha/1202c8a62974395ddc85a8724d983c81
Thank you!
Extra Details
No response
rp-loaded
is not a context that is included with LuckPerms by default. You should report this to whatever mod or plugin is adding the context instead.
also unrelated, but yaml storage is awful. If you like editing your permissions "visually", you should try the editor (/lp editor
).
rp-loaded
is not a context that is included with LuckPerms by default. You should report this to whatever mod or plugin is adding the context instead.also unrelated, but yaml storage is awful. If you like editing your permissions "visually", you should try the editor (
/lp editor
).
Thank you for response. rp-loaded
from my plugin, and this context displays correctly. I also tried gamemode and it returns true in all gamemodes:
lp user BunnyHonni permission check creative-gamemode
output:
https://gist.github.com/honnisha/38a5fb160d3d862c67e22af1f092bb44
Config:
- creative-gamemode:
value: true
context:
gamemode: creative
Both of these permissions are returning true as the op processor is returning true (the user is opped). Op status overrides any "unset" permissions. If a node's context check fails then the node is treated as "unset", not the negation of the value. 2 solutions:
a) Don't use OP. Aside from a few edge cases, everything op does can be done with permissions. That being said, if that's not an option:
b) Add a node with the opposite context and value, i.e. for creative-gamemode
, you might set creative-gamemode
to false with contexts survival, spectator, or adventure.