Skip to content

Command Reassign Custom (0.4.0)

Yao Chung Hu edited this page Jan 13, 2022 · 1 revision

Command Reassign Alias

When using command mode COMMAND_REASSIGN_AND_CUSTOM, is a combination of command reassignment and command alias.

Create a command alias using COMMAND_REASSIGN_AND_CUSTOM

First, we need to set our command mode to COMMAND_REASSIGN_AND_CUSTOM.

{
	"commandMode": "COMMAND_REASSIGN_AND_CUSTOM"
}

Now that we have set our command mode, we can define our new command.

{
	"commandMode": "COMMAND_REASSIGN_AND_CUSTOM",
	"command": "help"
}

After that, we chose what existing command our new command will reassign to. In this case, I chose the /help command.

{
	"commandMode": "COMMAND_REASSIGN_AND_CUSTOM",
	"command": "help",
	"reassignTo": "minecraft:help"
}

Note: The reassignTo field must not contain any spaces.

{
	"commandMode": "COMMAND_REASSIGN_AND_CUSTOM",
	"command": "help",
	"reassignTo": "minecraft:help",
	"customCommand": {
		"parent": "help",
		"actions": [
			{
				"command": "minecraft:help",
				"commandType": "CLIENT"
			}
		],
		"message": "/c - Changes gamemode to creative\n/s - Changes gamemode to survival"
	}
}

Examples

None at the moment.

Clone this wiki locally