Package net.draycia.carbon.api.event
Interface CarbonEventSubscription<T extends CarbonEvent>
- Type Parameters:
T- event type
@DefaultQualifier(org.checkerframework.checker.nullness.qual.NonNull.class)
public interface CarbonEventSubscription<T extends CarbonEvent>
A subscription to a specific event type.
- Since:
- 3.0.0
-
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Disposes this subscription.event()Gets the event type.Gets thesubscriber.
-
Method Details
-
event
Gets the event type.- Returns:
- the event type
- Since:
- 3.0.0
-
subscriber
CarbonEventSubscriber<T> subscriber()Gets thesubscriber.- Returns:
- the subscriber
- Since:
- 3.0.0
-
dispose
void dispose()Disposes this subscription.The subscriber held by this subscription will no longer receive events.
- Since:
- 3.0.0
-