Class Plugin
java.lang.Object
me.neurodock.plugin.Plugin
Entry point for the plugin, this is required for the plugin to work, and you MUST annotate it with
PluginEntryPoint-
Constructor Summary
ConstructorsConstructorDescriptionPlugin()This shuld be used ifPluginEntryPoint.requireData()is false (default)This shuld be used ifPluginEntryPoint.requireData()is true -
Method Summary
Modifier and TypeMethodDescriptionabstract @NotNull PluginMetadataThis represents your plugin's MetadataTool[]getTools()The "main" method of a plugin, it will be the one returning a list of all tools you define.voidThis will be called if the core gets a "fetal" exception or fails to fetch certain infovoidonEnable()This will be called after all plugins have been initialised; here it is safe to perform potential stuff where you load data from optional dependencies, or similar thingsvoidonInit()This will be called once every plugin has been loaded
-
Constructor Details
-
Plugin
public Plugin()This shuld be used ifPluginEntryPoint.requireData()is false (default) -
Plugin
This shuld be used ifPluginEntryPoint.requireData()is true- Parameters:
data- theDatagenerated by the plugin loader
-
-
Method Details
-
onInit
public void onInit()This will be called once every plugin has been loaded -
onDisable
public void onDisable()This will be called if the core gets a "fetal" exception or fails to fetch certain info -
onEnable
public void onEnable()This will be called after all plugins have been initialised; here it is safe to perform potential stuff where you load data from optional dependencies, or similar things -
getTools
The "main" method of a plugin, it will be the one returning a list of all tools you define.- Returns:
- An array of all
Tools you provide in this plugin, seeToolfor definitions or MAL API tool for ideas or examples
-
getMetadata
This represents your plugin's Metadata- Returns:
- A
PluginMetadataobject representing the metadata for your plugin
-