Class ModulePreStartEvent
java.lang.Object
eu.cloudnetservice.driver.event.Event
eu.cloudnetservice.driver.event.events.module.ModuleEvent
eu.cloudnetservice.driver.event.events.module.ModulePreStartEvent
- All Implemented Interfaces:
Cancelable
This event is being called before a module has been started and the tasks with the lifecycle
ModuleLifeCycle.STARTED of this module have been fired. ModuleWrapper.moduleLifeCycle() is still ModuleLifeCycle.LOADED or ModuleLifeCycle.STOPPED.- Since:
- 4.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionModulePreStartEvent(@NonNull ModuleProvider moduleProvider, @NonNull ModuleWrapper module) Constructs a new module pre start event. -
Method Summary
Methods inherited from class eu.cloudnetservice.driver.event.events.module.ModuleEvent
module, moduleProvider
-
Field Details
-
cancelled
private boolean cancelled
-
-
Constructor Details
-
ModulePreStartEvent
public ModulePreStartEvent(@NonNull @NonNull ModuleProvider moduleProvider, @NonNull @NonNull ModuleWrapper module) Constructs a new module pre start event.- Parameters:
moduleProvider- the provider in which the module is loaded.module- the module which is associated with this event.- Throws:
NullPointerException- if either the provider or wrapper is null.
-
-
Method Details
-
cancelled
public boolean cancelled()Gets the cancellation state of the event. A cancelled event will stop the execution of the representing change in the system, but will be passed to all event listeners nevertheless.- Specified by:
cancelledin interfaceCancelable- Returns:
- true if this is cancelled, false otherwise.
-
cancelled
public void cancelled(boolean value) Marks this event as cancelled and stops the execution of the representing change in the system. The event will be passed to other event listeners down the line anyway.- Specified by:
cancelledin interfaceCancelable- Parameters:
value- true if this event should get marked as cancelled, false otherwise.
-