ParsedCommand

data class ParsedCommand(val baseCommand: String, val arguments: List<String>)(source)

A parsed command with its base name and argument list.

Constructors

Link copied to clipboard
constructor(baseCommand: String, arguments: List<String>)

Properties

Link copied to clipboard

Number of arguments in this command.

Link copied to clipboard

the list of arguments following the command name

Link copied to clipboard

the command name (e.g. "fill", "tp")

Functions

Link copied to clipboard
fun getArgument(index: Int): String?

Returns the argument at index, or null if out of bounds.

Link copied to clipboard
fun getArgumentOrDefault(index: Int, defaultValue: String): String

Returns the argument at index, or defaultValue if out of bounds.

Link copied to clipboard

Returns true if this command has at least minArgs arguments.