Constructor
new Plugin(identifier)
The identifier is used to identify plugin and to
provide a location to store permanent data.
Parameters:
Name | Type | Description |
---|---|---|
identifier |
String | the plugins unique identifier |
Members
commandContainer :CommandContainer
A map that stores the commands for this plugin.
Type:
- CommandContainer
identifier :String
The plugin's unique identifier.
Type:
- String
(readonly) running :Boolean
True if the plugin is running.
Type:
- Boolean
Methods
configFileLocation() → {String}
Get the configuration file path for this plugin.
Returns:
a relative path to the configuration file
- Type
- String
dataDirLocation() → {String}
Get the data directory for this plugin.
Returns:
a relative path without a trailing slash
- Type
- String
defaultConfig() → {Object}
Called to specify the default configuration parameters.
The config object will not be loaded from the file if the default config returns null.
Returns:
a object containing the default configuration parameters or
null if a config file is not needed
- Type
- Object
startPlugin()
Called when the plugin should be started.
The client property is available when this method is called.
stopPlugin()
Called when the plugin should be stopped.
The plugin must release the client instance.