Class ModulePreLoadEvent
java.lang.Object
eu.cloudnetservice.driver.event.Event
eu.cloudnetservice.driver.event.events.module.ModuleEvent
eu.cloudnetservice.driver.event.events.module.ModulePreLoadEvent
- All Implemented Interfaces:
Cancelable
This event is being called after a module has been loaded and before the tasks with the lifecycle
ModuleLifeCycle.LOADED of this module have been fired. ModuleWrapper.moduleLifeCycle() is still ModuleLifeCycle.UNLOADED.- Since:
- 4.0
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionModulePreLoadEvent(@NonNull ModuleProvider moduleProvider, @NonNull ModuleWrapper module) Constructs a new pre load module event. -
Method Summary
Methods inherited from class eu.cloudnetservice.driver.event.events.module.ModuleEvent
module, moduleProvider
-
Field Details
-
cancelled
private boolean cancelled
-
-
Constructor Details
-
ModulePreLoadEvent
public ModulePreLoadEvent(@NonNull @NonNull ModuleProvider moduleProvider, @NonNull @NonNull ModuleWrapper module) Constructs a new pre load module 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.
-