Overview
The Plugin Engine API exposes some global methods and the plugin interface, where all the engine code will run.
Plugin Interface
The plugin engine class should implement this interface. There’s only one mandatory method run
. The other methods are used to subscribe to events.
Events available are listed here.
Example
Instantiate a plugin.
registerPlugin()
The function registerPlugin
is the entry point for the plugin engine. It should be called with the plugin instance in order to run the plugin.
Method signature
Parameters
plugin: PluginI<T>
: A Plugin instance
Example
Register a plugin instance.