mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-02 22:47:49 +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.
|
* has similar optimization built-in.
|
||||||
*
|
*
|
||||||
* @param handle the listener handle
|
* @param handle the listener handle
|
||||||
* @param <E> the event type
|
|
||||||
* @return true if the event has 1 or more listeners
|
* @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.
|
* 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
|
@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;
|
final Handle<T> castedHandle = (Handle<T>) handle;
|
||||||
if (!castedHandle.updated) castedHandle.update();
|
if (!castedHandle.updated) castedHandle.update();
|
||||||
return !castedHandle.listeners.isEmpty();
|
return !castedHandle.listeners.isEmpty();
|
||||||
|
Loading…
Reference in New Issue
Block a user