plugin.register
register(plugin: plugin.BasePlugin, name: string) → {}
Register a plugin.
// register a new plugin
me.plugin.register(TestPlugin, "testPlugin");
// the `testPlugin` class instance can also be accessed through me.plugin.cache
me.plugin.cache.testPlugin.myfunction ();
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
plugin | plugin.BasePlugin |
Plugin object to instantiate and register |
||
name | string |
<optional> |
plugin.constructor.name |
a unique name for this plugin |
...arguments | object |
<optional> |
all extra parameters will be passed to the plugin constructor |
Type | Description |
---|