mirror of
https://github.com/lucko/LuckPerms.git
synced 2025-09-08 21:30:55 +02:00
Micro-optimize temporary node audit (#4155)
This commit is contained in:
@@ -231,11 +231,11 @@ public final class EventDispatcher {
|
||||
}
|
||||
|
||||
public void dispatchNodeChanges(PermissionHolder target, DataType dataType, Difference<Node> changes) {
|
||||
if (!this.eventBus.shouldPost(NodeAddEvent.class) && !this.eventBus.shouldPost(NodeRemoveEvent.class)) {
|
||||
if (changes.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (changes.isEmpty()) {
|
||||
if (!this.eventBus.shouldPost(NodeAddEvent.class) && !this.eventBus.shouldPost(NodeRemoveEvent.class)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -431,8 +431,8 @@ public abstract class PermissionHolder {
|
||||
Difference<Node> result = getData(dataType).removeIf(Node::hasExpired);
|
||||
if (!result.isEmpty()) {
|
||||
invalidateCache();
|
||||
this.plugin.getEventDispatcher().dispatchNodeChanges(this, dataType, result);
|
||||
}
|
||||
this.plugin.getEventDispatcher().dispatchNodeChanges(this, dataType, result);
|
||||
return !result.isEmpty();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user