CommandContext

class CommandContext<T : CommandSender>(val sender: T, val args: Array<out Any>)

Context class for command execution.

Parameters

sender

The sender of the command.

args

The parsed arguments of the command.

Constructors

Link copied to clipboard
constructor(sender: T, args: Array<out Any>)

Properties

Link copied to clipboard
val args: Array<out Any>
Link copied to clipboard
val sender: T

Functions

Link copied to clipboard
inline fun <H> getArgument(index: Int): H

Gets the argument at the specified index, cast to the expected type.

Link copied to clipboard
fun size(): Int

Gets the number of parsed arguments.