Package com.velocitypowered.api.event
Interface AwaitingEventExecutor<E>
- Type Parameters:
E- event type
- All Superinterfaces:
EventHandler<E>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
An event handler that returns an
EventTask to await on.-
Method Summary
Modifier and TypeMethodDescriptiondefault voidExecutes this handler synchronously with the given event.@Nullable EventTaskexecuteAsync(E event) Executes this handler asynchronously with the given event.
-
Method Details
-
execute
Description copied from interface:EventHandlerExecutes this handler synchronously with the given event.- Specified by:
executein interfaceEventHandler<E>- Parameters:
event- the event to handle
-
executeAsync
Description copied from interface:EventHandlerExecutes this handler asynchronously with the given event.If asynchronous handling is not implemented, the event is executed synchronously and this method returns
null.- Specified by:
executeAsyncin interfaceEventHandler<E>- Parameters:
event- the event to handle- Returns:
- an
EventTaskrepresenting the async task, ornullif not async
-