PolarSubcommand Interface
Introduction#
The PolarSubcommand interface represents a subcommand built into Polar. It allows a plugin to relabel, hide or disable Polar's own subcommands.
Instances are obtained from Subcommands#polarSubcommands().
All setters return the same PolarSubcommand, so calls can be chained.
Methods#
label#
java
PolarSubcommand label(String label);Description:
Changes the label the subcommand is invoked with.
Parameters:
label- The new label.
Returns:
This PolarSubcommand.
hidden#
java
PolarSubcommand hidden(boolean hidden);Description:
Hides or shows the subcommand in the /polar help listing.
Parameters:
hidden-trueto hide the subcommand.
Returns:
This PolarSubcommand.
enabled#
java
PolarSubcommand enabled(boolean enabled);Description:
Enables or disables the subcommand. A disabled subcommand cannot be executed.
Parameters:
enabled-falseto disable the subcommand.
Returns:
This PolarSubcommand.
Example#
java
api.subcommands().polarSubcommands().get("reload")
.label("refresh")
.hidden(true);