mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-02 14:38:26 +01:00
Fix recursive class selection
This commit is contained in:
parent
9a4ced9a6e
commit
8297089ca8
@ -262,10 +262,9 @@ class EventNodeImpl<T extends Event> implements EventNode<T> {
|
||||
consumer.accept(type);
|
||||
// Recursion
|
||||
if (RecursiveEvent.class.isAssignableFrom(type)) {
|
||||
final var superclass = type.getSuperclass();
|
||||
if (superclass != null && RecursiveEvent.class.isAssignableFrom(superclass)) consumer.accept(superclass);
|
||||
for (var inter : type.getInterfaces()) {
|
||||
if (RecursiveEvent.class.isAssignableFrom(inter)) consumer.accept(inter);
|
||||
final Class<?> superclass = type.getSuperclass();
|
||||
if (superclass != null && RecursiveEvent.class.isAssignableFrom(superclass)) {
|
||||
forTargetEvents(superclass, consumer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user