call

@NotNull
open fun <T : ModelEvent?> call(@NotNull eventClass: @NotNull Class<T>, @NotNull eventSupplier: @NotNull Supplier<T>): @NotNull BetterModelEventBus.Result

Calls an event on the global event bus.

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


open fun call(@NotNull event: @NotNull ModelEvent): Boolean

Calls an event and checks if it was cancelled.

If the event is cancellable, this method returns true only if the event was NOT cancelled. If the event is not cancellable, it always returns true.

Return

true if the event should proceed (not cancelled), false otherwise

Since

2.0.0

Parameters

event

the event to call