Name of the Plugin. Every Plugin should have a unique name, since they can be accessed directly by their names from inside a Room object.
Optionalactive: booleanActivation status of the Plugin. If this is true, the Plugin is automatically activated just after initialization, while a Room object is being created.
Optionalmetadata: anyAny information that we would want to show/update inside a GUI application about this Plugin. This is not used by the API by default, but we can reprogram the Plugin's prototype to make use of this value if we want.
void.
// If you are using require.js library or in node.js,
// API might also be defined via var API = require("mooball");
function TestPlugin(API){
const { Plugin, AllowFlags } = API;
Object.setPrototypeOf(this, Plugin.prototype);
Plugin.call(this, "template", true, {
version: "0.1",
author: "author",
description: `This is a test plugin`,
allowFlags: AllowFlags.CreateRoom|AllowFlags.JoinRoom
});
// Plugin codes here...
}
Creates a new
Plugininstance.