Skip to content

Plugins

mak001 edited this page Oct 12, 2015 · 5 revisions

###The Plugin class The Plugin class is the base class used to make a plugin. The constructor of the Plugin needs to be set up a particular way.

public ExamplePlugin() {
	super("PluginCommand");
	//Other things can happen here
}

The PluginCommand String is the main command for the Plugin. It allows the bot to create commands to list all the commands the plugins adds.

####Logging To send information to the log it is recommended to use the log(String) method. It allows users and coders to change the log level to debug.

log("Testing the logger");

###Plugin Manifest The Manifest is required for a plugin to be recognized as a valid plugin. Any plugin that was found but did not have a Manifest will not be loaded, and therefore will not be run. The required fields of the manifest are author names and the name of the plugin. An example of a valid bare minimum Manifest:

@Manifest(authors = { "mak001" }, name = "Basic Plugin Manifest")

Optional fields are description, version, and website. The description and website fields are String objects, while version is a double. An example of a full Manifest:

@Manifest(authors = { "mak001", "mak002" }, name = "Full Plugin Manifest", 
       description = "A manifest with all the optional fields filled out.", 
       website = "example.com", version = 1.0)
Clone this wiki locally