mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Use lambda metadata factory for events
stonks
This commit is contained in:
parent
ac134b84f2
commit
5abf989139
7 changed files with 146 additions and 44 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue