Use lambda metadata factory for events

stonks
This commit is contained in:
RednedEpic 2022-01-16 22:52:27 -06:00
parent ac134b84f2
commit 5abf989139
7 changed files with 146 additions and 44 deletions

View file

@ -28,8 +28,6 @@ package org.geysermc.geyser.api.event;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.geysermc.geyser.api.extension.Extension;
import java.util.function.Consumer;
/**
* Represents a subscribed listener to a {@link Event}. Wraps around
* the event and is capable of unsubscribing from the event or give
@ -47,15 +45,6 @@ public interface EventSubscription<T extends Event> {
@NonNull
Class<T> eventClass();
/**
* Gets the consumer responsible for handling
* this event.
*
* @return the consumer responsible for this event
*/
@NonNull
Consumer<? super T> eventConsumer();
/**
* Gets the {@link Extension} that owns this
* event subscription.