Init

@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class Init(val stage: InitStage, val dispatcher: Dispatcher = Dispatcher.SYNC, val runAfter: Array<KClass<*>> = [], val runBefore: Array<KClass<*>> = [])

Marks an addon class to be initialized at startup.

Classes marked with this annotation will be loaded during initialization. If there are methods annotated with the InitFun annotation in the class, they will be called. On disable, the methods annotated with the DisableFun annotation will be called.

Parameters

stage

The InternalInitStage at which the class should be initialized.

dispatcher

Defines how the initialization is dispatched.

runAfter

The classes (and init functions) which should be initialized before this class. (This class is initialized after them.) Those classes must be annotated with Init or InternalInit.

runBefore

The classes (and init functions) which should be initialized after this class. (This class is initialized before them.) Those classes must be annotated with Init or InternalInit.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard