mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-06 16:37:38 +01:00
Add EventNode#removeChild
This commit is contained in:
parent
11bdcdf92a
commit
aa5a182788
@ -33,6 +33,8 @@ public interface EventNode<T extends Event> {
|
||||
|
||||
void addChild(@NotNull EventNode<? extends T> child);
|
||||
|
||||
void removeChild(@NotNull EventNode<? extends T> child);
|
||||
|
||||
void addListener(@NotNull EventListener<? extends T> listener);
|
||||
|
||||
void removeListener(@NotNull EventListener<? extends T> listener);
|
||||
|
@ -52,6 +52,11 @@ class EventNodeImpl<T extends Event> implements EventNode<T> {
|
||||
this.children.add((EventNode<T>) child);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeChild(@NotNull EventNode<? extends T> child) {
|
||||
this.children.remove(child);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addListener(@NotNull EventListener<? extends T> listener) {
|
||||
this.listenerMap.computeIfAbsent(listener.type, aClass -> new CopyOnWriteArrayList<>())
|
||||
|
Loading…
Reference in New Issue
Block a user