SubCommand

fun SubCommand(name: String, arguments: List<String> = emptyList(), tabCompletions: (CommandSender) -> Map<String, Collection<String>>, executor: (CommandExecutor) -> Unit = {})

Parameters

name

The name of the argument

arguments

The arguments of the subCommand

tabCompletions

The tab completions of the arguments mapped by name and their respective completions

executor

The function to execute when the argument is executed

Signature format: {argument1} {argument2}...

Examples:

  • ban {player} -> The name is ban, the argument is player.

  • ban {uuid} -> The name is ban, the argument is uuid.