mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-20 07:02:32 +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
|
||||
synchronized (lock) {
|
||||
final int childCount = childEventMap.getInt(eventClass);
|
||||
if (childCount < 1) {
|
||||
if (childEventMap.isEmpty() || childEventMap.getInt(eventClass) < 1) {
|
||||
// No listener in children
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user