Polar Help

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

PolarSubcommand label(String label);

Description:

Changes the label the subcommand is invoked with.

Parameters:

  • label - The new label.

Returns:

This PolarSubcommand.

hidden

PolarSubcommand hidden(boolean hidden);

Description:

Hides or shows the subcommand in the /polar help listing.

Parameters:

  • hidden - true to hide the subcommand.

Returns:

This PolarSubcommand.

enabled

PolarSubcommand enabled(boolean enabled);

Description:

Enables or disables the subcommand. A disabled subcommand cannot be executed.

Parameters:

  • enabled - false to disable the subcommand.

Returns:

This PolarSubcommand.

Example

api.subcommands().polarSubcommands().get("reload") .label("refresh") .hidden(true);