Skip to main content

@Command

Marks a class as a command and defines its name and description.

Usage


@Command(value = "mycommand", description = "Does something useful")
public class MyCommand extends CommandBase {
// ...
}

Attributes

AttributeRequiredDescription
valueThe name of the command (e.g. /mycommand).
descriptionA short description shown in help output.

Notes

  • The class must be public.
  • The class must extend CommandBase.
  • You do not need to declare the command in plugin.yml.