LuckPerms

LuckPerms

41.4k Downloads

getPermissionValue returning true when contexts are not all satisfied

bloodmc opened this issue ยท 1 comments

commented

Using LP v4.3.79

I currently have the following permission in default.json

"context": { "gp_claim": "0c1ceb06-b8cc-47fd-8a45-cc1b16e196ea", "used_item": "minecraft:wooden_sword" }, "data": { "griefprevention.flag.entity-damage": true }

The transient permissions use the following contexts [gp_claim_default=BASIC, gp_default_holder=holder]

GP makes the following permission call
Tristate value = GriefPreventionPlugin.GLOBAL_SUBJECT.getPermissionValue(contexts, permission);

The permission is griefprevention.flag.interact-item-primary.minecraft.diamond_sword
The contexts are [gp_claim_default=BASIC, used_item=minecraft:diamond_sword.0]

According to our discussion earlier, this should not be satisfied as the gp_default_holder context was not included in the permission check.

commented

Yep, it wouldn't be satisfied.