-
Notifications
You must be signed in to change notification settings - Fork 4
Command Flags
Mazen edited this page Apr 16, 2023
·
2 revisions
Flags are specific characters that start with '-' and can be used to modify the execution of the command syntax
commandManager.flagRegistry().registerFlag(
FlagInfo.builder("silent")
.info(new Information("flag.silent", "Silently do things !"))
.aliases("s", "sN")
.build());
First parameter in info()
is the permission of the flag, while
the second one is for the description of the flag
You can specify an alias of the flag which will be used to detect the usage of that flag.
I hope this wiki helped you with learning how to fully utilize mCommands