Package org.geysermc.event.subscribe
Interface Subscriber<T>
-
- Type Parameters:
T- the class of the event
- All Known Subinterfaces:
OwnedSubscriber<O,T>
- All Known Implementing Classes:
OwnedSubscriberImpl,SubscriberImpl
public interface Subscriber<T>Represents a subscribed listener to an event. Wraps around the event and is capable of unsubscribing from the event or give information about it.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NonNull java.lang.Class<T>eventClass()Returns the event class.booleanignoreCancelled()Returns if this subscription ignores cancelled events.voidinvoke(@NonNull T event)Invokes a given event.@NonNull PostOrderorder()Returns the post order of this event subscription.
-
-
-
Method Detail
-
eventClass
@NonNull java.lang.Class<T> eventClass()
Returns the event class.
-
order
@NonNull PostOrder order()
Returns the post order of this event subscription.
-
ignoreCancelled
boolean ignoreCancelled()
Returns if this subscription ignores cancelled events.
-
invoke
void invoke(@NonNull T event) throws java.lang.Throwable
Invokes a given event.- Parameters:
event- the event to invoke- Throws:
java.lang.Throwable
-
-