The static class that manages plugins in the game
Methods
- Calls a plugin command
Name Type Description self
context The context passed to the function pluginName
string The name of the plugin commandName
string The name of the plugin command args
Object The various arguments passed to the callback function - Checks if any errors were encountered while loading plugins
- Appends the plugin script file to the html game page
Name Type Description filename
string The plugin filename - Returns the full url of the plugin file including folder + filename + extension
Name Type Description filename
Error The filename of the plugin with no extension Returns:
Type Description string The full url of the plugin file including folder + filename + extension - Adds an error to the error stack if there was a problem loading a plugin
Name Type Description e
Error The returned error - Gets the parameters of a given plugin
Name Type Description name
string The name of the plugin - Register a plugin command by plugin name, command name, and callback function
Name Type Description pluginName
string The name of the plugin commandName
string The name of the plugin command func
function The callback function to call when plugin command is called - Sets the parameters of a given plugin
Name Type Description name
string The name of the plugin parameters
Object The parameters of the plugin - Sets up all plugins
Name Type Description plugins
Array array of plugin objects including name, status, and parameters - Throws an error if a plugin failed to load
Throws:
Failed to load error