mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-28 02:51:42 +01:00
Reuse local booleans for readability
This commit is contained in:
parent
ad37cc8cf3
commit
f1a4f002c3
@ -324,7 +324,7 @@ non-sealed class EventNodeImpl<T extends Event> implements EventNode<T> {
|
||||
final boolean hasListeners = listenersArray.length > 0;
|
||||
final boolean hasMap = mappedListener != null;
|
||||
final boolean hasChildren = childrenListeners.length > 0;
|
||||
if (listenersArray.length == 0 && mappedListener == null && childrenListeners.length == 0) {
|
||||
if (!hasListeners && !hasMap && !hasChildren) {
|
||||
// No listener
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user