Package org.geysermc.event.bus
Interface BaseBus<E,S extends Subscriber<? extends E>>
- All Known Subinterfaces:
EventBus<E,,S> OwnedEventBus<O,E, S>
- All Known Implementing Classes:
EventBusImpl,OwnedEventBusImpl
public interface BaseBus<E,S extends Subscriber<? extends E>>
-
Method Summary
Modifier and TypeMethodDescriptionFires the given event and log all exceptions that occur while executing this event.fireSilently(@NonNull E event) Fires the given event silently.<T extends E>
@NonNull Set<? extends Subscriber<T>>subscribers(@NonNull Class<T> eventClass) Gets the subscriptions for the given event class.voidunsubscribe(@NonNull S subscription) Unsubscribes the givenSubscriber.
-
Method Details
-
unsubscribe
Unsubscribes the givenSubscriber.- Parameters:
subscription- the event subscription
-
fire
Fires the given event and log all exceptions that occur while executing this event.- Parameters:
event- the event to fire
-
fireSilently
Fires the given event silently.- Parameters:
event- the event to fire- Returns:
- the result of firing the given event
-
subscribers
Gets the subscriptions for the given event class.- Type Parameters:
T- the value- Parameters:
eventClass- the event class- Returns:
- the subscriptions for the event class
-