call
abstract fun <T : ModelEvent?> call(@NotNull eventClass: @NotNull Class<out T>, @NotNull eventSupplier: @NotNull Supplier<T>): @NotNull BetterModelEventBus.Result
Publishes an event to all registered subscribers.
The event is created lazily using the provided supplier if there are subscribers.
Return
the result of the event call
Since
2.0.0
Parameters
eventClass
the class of the event
eventSupplier
a supplier that creates the event
<T>
the type of the event
Publishes an event to all registered subscribers.
Return
the result of the event call
Since
2.0.0
Parameters
event
the event to publish