VitalPlugin

abstract class VitalPlugin(val pluginEnvironment: VitalPlugin.PluginEnvironment)

This class defines internal functionality required to initialize and shutdown a Vital plugin and should rarely be used by developers manually. Plugin bootstrapping is automatically done via the vital-gradle-plugin and initialization is done by vital-loader.

If you for some reason MUST initialize your Vital plugin manually, this would be the class you have to use.

Inheritors

Constructors

Link copied to clipboard
constructor(pluginEnvironment: VitalPlugin.PluginEnvironment)

Types

Link copied to clipboard
abstract class Bungee : VitalPlugin
Link copied to clipboard
object Companion
Link copied to clipboard
@Configuration(proxyBeanMethods = false)
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class Info(val name: String, val description: String, val apiVersion: String, val version: String, val author: Array<String>, val scanAdditionalPackages: Array<String> = [])

Defines the info for a Vital-powered plugin. The data defined in this annotation will be used to generate the final plugin jar. A plugin must always have exactly 1 main class that is annotated with this annotation.

Link copied to clipboard
data class Metadata(val mainClassName: String)
Link copied to clipboard
abstract class Paper : VitalPlugin
Link copied to clipboard

Defines all plugin environments supported by Vital.

Link copied to clipboard
abstract class Spigot : VitalPlugin

Properties

Link copied to clipboard
lateinit var context: ConfigurableApplicationContext
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun exit()

Shuts down the running Vital framework instance by killing the existing Spring context.

Link copied to clipboard
fun isVitalModuleEnabled(vitalModuleName: String): Boolean

Returns if the given vitalModuleName is enabled. Note: Modules are enabled sequentially, during the initialization phase, this function might return false for a module that will be enabled later in the pipeline.

Link copied to clipboard
open fun onDisable()

Lifecycle function; called when this plugin is disabled.

Link copied to clipboard
open fun onEnable()

Lifecycle function; called when this plugin is enabled.