Skip to content

Developer: ToolSet Commands

zoweb edited this page Jun 11, 2017 · 1 revision

ToolSet commands must implement the ToolSetCommand interface. This interface allows you to set the configuration default configuration of a command (because of ToolSet's theme of "ConfigForEverything") as well as its onCommand.

As the onCommand method is described in Spigot's javadocs, only the setConfigurationDefaults method will be explained.

setConfigurationDefaults is a method that gets run with a ToolSetConfiguration instance as its only argument. This instance allows you to set the configuration file name and other values using ConfigReload.setIfNotSet(ToolSetConfiguration section, String path, String value). The setConfigurationDefaults method returns the updated section. It gets run every time the command gets enabled.

A more in-depth explanation of ToolSetConfiguration is available in the Developer: ToolSet Configuration page.

Are you a developer? Check out the "Developer" pages above.

Are you a user? Check out the "User" pages above.

Clone this wiki locally