mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-30 22:53:27 +01:00
Fix removal of temporary nodes
This commit is contained in:
parent
075ba33e8b
commit
ba10b1c06e
@ -284,7 +284,7 @@ public abstract class PermissionHolder {
|
|||||||
|
|
||||||
private static Tristate hasPermission(Set<Node> toQuery, Node node) {
|
private static Tristate hasPermission(Set<Node> toQuery, Node node) {
|
||||||
for (Node n : toQuery) {
|
for (Node n : toQuery) {
|
||||||
if (n.equalsIgnoringValue(node)) {
|
if (n.almostEquals(node)) {
|
||||||
return n.getTristate();
|
return n.getTristate();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -425,7 +425,13 @@ public abstract class PermissionHolder {
|
|||||||
throw new ObjectLacksException();
|
throw new ObjectLacksException();
|
||||||
}
|
}
|
||||||
|
|
||||||
nodes.remove(node);
|
Iterator<Node> iterator = nodes.iterator();
|
||||||
|
while (iterator.hasNext()) {
|
||||||
|
Node entry = iterator.next();
|
||||||
|
if (entry.almostEquals(node)) {
|
||||||
|
iterator.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (node.isGroupNode()) {
|
if (node.isGroupNode()) {
|
||||||
plugin.getApiProvider().fireEventAsync(new GroupRemoveEvent(new PermissionHolderLink(this),
|
plugin.getApiProvider().fireEventAsync(new GroupRemoveEvent(new PermissionHolderLink(this),
|
||||||
@ -445,7 +451,13 @@ public abstract class PermissionHolder {
|
|||||||
throw new ObjectLacksException();
|
throw new ObjectLacksException();
|
||||||
}
|
}
|
||||||
|
|
||||||
transientNodes.remove(node);
|
Iterator<Node> iterator = transientNodes.iterator();
|
||||||
|
while (iterator.hasNext()) {
|
||||||
|
Node entry = iterator.next();
|
||||||
|
if (entry.almostEquals(node)) {
|
||||||
|
iterator.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (node.isGroupNode()) {
|
if (node.isGroupNode()) {
|
||||||
plugin.getApiProvider().fireEventAsync(new GroupRemoveEvent(new PermissionHolderLink(this),
|
plugin.getApiProvider().fireEventAsync(new GroupRemoveEvent(new PermissionHolderLink(this),
|
||||||
|
Loading…
Reference in New Issue
Block a user