-
Notifications
You must be signed in to change notification settings - Fork 0
Command Properties
mario edited this page Mar 29, 2026
·
1 revision
@Command is placed on a method to register it as a command.
| Property | Type | Default | Description |
|---|---|---|---|
names |
String[] |
— | One or more aliases. Supports subcommands via spaces, e.g. "f create". |
permission |
String |
"" |
Required permission node. Leave empty to allow everyone. |
description |
String |
"" |
Short description shown in help messages. |
playerOnly |
boolean |
false |
Restricts the command to players only. |
consoleOnly |
boolean |
false |
Restricts the command to console only. |
async |
boolean |
false |
Runs the command off the main thread. On Folia, routes through AsyncScheduler automatically. |
allowComplete |
boolean |
true |
Whether tab completion is enabled for this command. |
hidden |
boolean |
false |
Sends an unknown command message to non-op players instead of the permission error. |
-
playerOnlyandconsoleOnlyare mutually exclusive. - When using
@Subcommand, the root aliases are prepended tonamesautomatically — see Subcommand Groups.