public interface ViaVersionCommand
Modifier and Type | Method and Description |
---|---|
@Nullable ViaSubCommand |
getSubCommand(String name)
Get subcommand instance by name
|
boolean |
hasSubCommand(String name)
Check if a subcommand is registered.
|
boolean |
onCommand(ViaCommandSender sender,
String[] args)
Executed when the Command sender executes the commands
|
List<String> |
onTabComplete(ViaCommandSender sender,
String[] args)
Executed when the Command sender tab-completes
|
void |
registerSubCommand(ViaSubCommand command)
Register your own subcommand inside ViaVersion
|
void registerSubCommand(ViaSubCommand command) throws Exception
command
- Your own SubCommand instance to handle it.Exception
- throws an exception when the subcommand already exists or if it's not valid, example: spaceeboolean hasSubCommand(String name)
name
- Subcommand name@Nullable @Nullable ViaSubCommand getSubCommand(String name)
name
- subcommand nameboolean onCommand(ViaCommandSender sender, String[] args)
sender
- Sender objectargs
- arguments providedList<String> onTabComplete(ViaCommandSender sender, String[] args)
sender
- Sender objectargs
- arguments providedCopyright © 2016–2021. All rights reserved.