Redirect without arguments
When using the COMMAND_REDIRECT_NOARG command mode, it creates a new command alias that redirects to an existing command without its trailing command arguments.
Create a command alias using COMMAND_REDIRECT_NOARG
COMMAND_REDIRECT_NOARGTo begin, we must set our command mode to COMMAND_REDIRECT_NOARG.
JSON or JSON5
{
"schemaVersion": 1,
"commandMode": "COMMAND_REDIRECT_NOARG"
}TOML
schemaVersion = 1
commandMode = "COMMAND_REDIRECT_NOARG"YAML
schemaVersion: 1
commandMode: COMMAND_REDIRECT_NOARGWith the command mode set, we can now define our new command.
JSON or JSON5
{
"schemaVersion": 1,
"commandMode": "COMMAND_REDIRECT_NOARG",
"command": "easy"
}TOML
YAML
Finally, we must choose the existing command that our new command will redirect to. In this case, I have chosen the /difficulty easy command.
JSON or JSON5
TOML
YAML
Next, let's create another one for the /gamemode survival command.
JSON or JSON5
TOML
YAML
Examples
Time Command
Day
JSON or JSON5
TOML
YAML
Night
JSON or JSON5
TOML
YAML
Game Mode Command (1.19.2 and below)
Survival
JSON or JSON5
TOML
YAML
Creative
JSON or JSON5
TOML
YAML
Adventure
JSON or JSON5
TOML
YAML
Spectator
JSON or JSON5
TOML
YAML
Difficulty Command
Peaceful
JSON or JSON5
TOML
YAML
Easy
JSON or JSON5
TOML
YAML
Normal
JSON or JSON5
TOML
YAML
Hard
JSON or JSON5
TOML
YAML
Last updated
Was this helpful?