mirror of
https://github.com/Minestom/Minestom.git
synced 2024-12-30 21:17:53 +01:00
Remove unnecessary generic declaration
This commit is contained in:
parent
c6cc96a5f9
commit
a58e149918
@ -222,10 +222,9 @@ public interface EventNode<T extends Event> {
|
||||
* has similar optimization built-in.
|
||||
*
|
||||
* @param handle the listener handle
|
||||
* @param <E> the event type
|
||||
* @return true if the event has 1 or more listeners
|
||||
*/
|
||||
<E extends T> boolean hasListener(@NotNull ListenerHandle<E> handle);
|
||||
boolean hasListener(@NotNull ListenerHandle<? extends T> handle);
|
||||
|
||||
/**
|
||||
* Execute a cancellable event with a callback to execute if the event is successful.
|
||||
|
@ -58,7 +58,7 @@ class EventNodeImpl<T extends Event> implements EventNode<T> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public <E extends T> boolean hasListener(@NotNull ListenerHandle<E> handle) {
|
||||
public boolean hasListener(@NotNull ListenerHandle<? extends T> handle) {
|
||||
final Handle<T> castedHandle = (Handle<T>) handle;
|
||||
if (!castedHandle.updated) castedHandle.update();
|
||||
return !castedHandle.listeners.isEmpty();
|
||||
|
Loading…
Reference in New Issue
Block a user