SubCommand

data class SubCommand(name: String, arguments: List<String>, tabCompletions: (CommandSender) -> Map<String, Collection<String>>, executor: (CommandExecutor) -> Unit)

Representation of a SubCommand

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.

Constructors

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

Properties

Link copied to clipboard
val arguments: List<String>
Link copied to clipboard
val executor: (CommandExecutor) -> Unit
Link copied to clipboard
val name: String
Link copied to clipboard
val tabCompletions: (CommandSender) -> Map<String, Collection<String>>