Annotation Interface SubCommand
Annotation for marking a method as a subcommand handler.
Used to specify subcommand name, description, aliases, and permission
requirement.
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionString[]Subcommand aliases.Subcommand description.How this node's execute is owned when several plugins contribute to the same command tree.String[]Optional parent path segments for nested subcommands.Specific permission node required to execute the subcommand.Default permission state (matches Bukkit PermissionDefault).Threading policy for subcommand execution.
-
Element Details
-
name
-
path
String[] pathOptional parent path segments for nested subcommands.- Returns:
- parent path segments
- Default:
{}
-
description
-
aliases
-
permission
String permissionSpecific permission node required to execute the subcommand. If empty, no check is performed.- Returns:
- permission node
- Default:
""
-
permissionDefault
MagicPermissionDefault permissionDefaultDefault permission state (matches Bukkit PermissionDefault).- Returns:
- default permission
- Default:
OP
-
threading
CommandThreading threadingThreading policy for subcommand execution.- Returns:
- threading policy
- Default:
MAIN
-
merge
MergePolicy mergeHow this node's execute is owned when several plugins contribute to the same command tree. Leaf sub-commands always accumulate; this only decides who owns the handler that runs when a player stops at this node. Defaults toMergePolicy.CONTRIBUTE(claim only if free — safe for shared roots).- Returns:
- the merge policy for this node's execute
- Default:
CONTRIBUTE
-