mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-01 04:51:29 +01:00
Fast exit when a node as no child
This commit is contained in:
parent
c4d521cde5
commit
f39fc8c81e
@ -121,8 +121,7 @@ public class EventNode<T extends Event> {
|
|||||||
}
|
}
|
||||||
// Process children
|
// Process children
|
||||||
synchronized (lock) {
|
synchronized (lock) {
|
||||||
final int childCount = childEventMap.getInt(eventClass);
|
if (childEventMap.isEmpty() || childEventMap.getInt(eventClass) < 1) {
|
||||||
if (childCount < 1) {
|
|
||||||
// No listener in children
|
// No listener in children
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user