Define the custom command, including name, permissions, and parameters.

Custom Command APIs are released as part of Scripting API 2.0 Beta in Minecraft v1.21.80. Here's a video from Mojang that covers the custom command APIs.

interface CustomCommand {
    description: string;
    mandatoryParameters?: CustomCommandParameter[];
    name: string;
    optionalParameters?: CustomCommandParameter[];
    permissionLevel: CommandPermissionLevel;
}

Properties

description: string

Command description as seen on the command line.

mandatoryParameters?: CustomCommandParameter[]

List of mandatory command parameters.

name: string

The name of the command. A namespace is required.

optionalParameters?: CustomCommandParameter[]

List of optional command parameters.

permissionLevel: CommandPermissionLevel

The permission level required to execute the command.

MMNEPVFCICPMFPCPTTAAATR