Interface EventCallback<T extends SkoiceEvent>
- Type Parameters:
T- the type of event this callback handles
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A functional interface for handling Skoice events.
This interface can be used as an alternative to Consumer
when subscribing to events via EventBus.subscribeCallback(Class, EventCallback).
Example usage:
EventCallback<PlayerProximityConnectEvent> callback = event -> {
UUID playerId = event.getMinecraftId();
String discordId = event.getDiscordId();
// Handle the event
};
eventBus.subscribeCallback(PlayerProximityConnectEvent.class, callback);
- See Also:
-
Method Summary
-
Method Details
-
handle
-