Subcommands Interface
Introduction
The Subcommands interface allows plugins to register their own subcommands under the /polar command, and to inspect or adjust the subcommands that ship with Polar.
It is accessed through PolarApi#subcommands().
Methods
registerSubcommand
Description:
Registers a custom subcommand. Once registered, it is executed as /polar <label> [args...].
Parameters:
subcommand- The Subcommand implementation to register.plugin- The BukkitPluginregistering the subcommand.
Returns:
Nothing.
subcommands
Description:
Gets the subcommands registered by a specific plugin.
Parameters:
plugin- The BukkitPluginthat registered the subcommands.
Returns:
A map of the plugin's registered Subcommands, keyed by label.
polarSubcommands
Description:
Gets the subcommands built into Polar (for example alerts, reload, help). Each entry can be relabelled, hidden or disabled through the PolarSubcommand interface.
Returns:
A map of built-in PolarSubcommands, keyed by label.