Adds an event listener for a specific event.
The type of the event key.
An EventHandle with a remove method to unsubscribe the listener.
Dispatches the given event with given payload on the plugin.
Called by the plugin system is initialized.
OptionalhookCalled when the plugin is registered in the system. The result of this hook determines whether the plugin is enabled.
The context provided to the plugin.
Whether the plugin should be enabled.
Called when the plugin system is manually torn down. This should be used to clean up resources.
The context provided to the plugin.
Checks if the plugin has been torn down.
true if the plugin has been torn down, otherwise false.
Adds the given Disposable to be owned by this plugin.