command %name:EXPR% — Blocks

command %name:EXPR%
Command1.0.0

Description

Declares a custom command with automatic argument parsing.

Allowed Contexts

Root LevelInside Block

Block Variables

player
player
NullableYes

The player who executed the command, or null if the console ran it

sender
sender
NullableNo

The command sender (player or console)

world
world
NullableYes

The world the player is in, or null if the console ran it

args
list of string
NullableNo

The command arguments as a mutable list of strings

Examples

command hello: send player "Hello!"

All Possible Usages (1)

Every distinct way you can write this pattern, with optional groups and choice groups expanded. Placeholders are shown as <name>.

command <name>