mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-24 11:38:40 +01:00
Fix Sponge subject data permission overrides
This commit is contained in:
parent
61eb86b3a0
commit
69b3c96e09
@ -133,11 +133,22 @@ public class LuckPermsSubjectData implements SubjectData {
|
|||||||
builder.withExtraContext(ct.getKey(), ct.getValue());
|
builder.withExtraContext(ct.getKey(), ct.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Node node = builder.build();
|
||||||
|
|
||||||
|
// Workaround: unset the inverse, to allow false -> true, true -> false overrides.
|
||||||
try {
|
try {
|
||||||
if (enduring) {
|
if (enduring) {
|
||||||
holder.setPermission(builder.build());
|
holder.unsetPermission(node);
|
||||||
|
}else {
|
||||||
|
holder.unsetTransientPermission(node);
|
||||||
|
}
|
||||||
|
} catch (ObjectLacksException ignored) {}
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (enduring) {
|
||||||
|
holder.setPermission(node);
|
||||||
} else {
|
} else {
|
||||||
holder.setTransientPermission(builder.build());
|
holder.setTransientPermission(node);
|
||||||
}
|
}
|
||||||
} catch (ObjectAlreadyHasException ignored) {}
|
} catch (ObjectAlreadyHasException ignored) {}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user