-
Notifications
You must be signed in to change notification settings - Fork 0
Developer: ToolSet Commands
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.
Hey! I see that you're on the ToolSet Wiki! If you have any issues with ToolSet, remember to post it on the issues page so that we can fix it!
Are you a developer? Check out the "Developer" pages above.
Are you a user? Check out the "User" pages above.