McCommand

interface McCommand

Represents a Minecraft command to be executed by a McCommandSource.

Command should implement the execute method to specify the behavior of the command when executed, and optionally provide suggestions and permission checks.

Functions

Link copied to clipboard
abstract fun execute(source: McCommandSource, arguments: Array<String>)

Invoked when a McCommandSource executes the command.

Link copied to clipboard
open fun hasPermission(source: McCommandSource, arguments: Array<String>?): Boolean

Checks if the command source has permission to execute this command.

Link copied to clipboard
open fun suggest(source: McCommandSource, arguments: Array<String>): List<String>

Provides a list of command suggestions based on the current input.