Adds a reset event
This commit is contained in:
parent
96b096478c
commit
fca7a9ce61
3 changed files with 63 additions and 0 deletions
|
@ -0,0 +1,11 @@
|
|||
package dev.zontreck.eventsbus.events;
|
||||
|
||||
import dev.zontreck.eventsbus.Event;
|
||||
|
||||
/**
|
||||
* This event is sent out when the Event Bus is ready.
|
||||
* <p>
|
||||
* This is also dispatched when a reset occurs, prior to clearing the lists.
|
||||
*/
|
||||
public class EventBusReadyEvent extends Event {
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package dev.zontreck.eventsbus.events;
|
||||
|
||||
import dev.zontreck.eventsbus.Cancellable;
|
||||
import dev.zontreck.eventsbus.Event;
|
||||
|
||||
/**
|
||||
* Posted when the event bus is about to be reset.
|
||||
* <p>
|
||||
* This event can be cancelled to prevent the reset.
|
||||
* <p>
|
||||
* The default behavior is: Allow Reset.
|
||||
* <p>
|
||||
* Recommended that handlers be implemented to re-register instances, and classes when a reset occurs.
|
||||
*/
|
||||
@Cancellable
|
||||
public class ResetEventBusEvent extends Event {
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue