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
To begin, we must set our command mode to COMMAND_REDIRECT_NOARG
.
Copy {
"schemaVersion" : 1 ,
"commandMode" : "COMMAND_REDIRECT_NOARG"
}
Copy schemaVersion = 1
commandMode = "COMMAND_REDIRECT_NOARG"
Copy schemaVersion : 1
commandMode : COMMAND_REDIRECT_NOARG
With the command mode set, we can now define our new command.
Copy {
"schemaVersion" : 1 ,
"commandMode" : "COMMAND_REDIRECT_NOARG" ,
"command" : "easy"
}
Copy schemaVersion = 1
commandMode = "COMMAND_REDIRECT_NOARG"
command = "easy"
Copy schemaVersion : 1
commandMode : COMMAND_REDIRECT_NOARG
command : easy
Finally, we must choose the existing command that our new command will redirect to. In this case, I have chosen the /difficulty easy
command.
Copy {
"schemaVersion" : 1 ,
"commandMode" : "COMMAND_REDIRECT_NOARG" ,
"command" : "easy" ,
"redirectTo" : "difficulty easy"
}
Copy schemaVersion = 1
commandMode = "COMMAND_REDIRECT_NOARG"
command = "easy"
redirectTo = "difficulty easy"
Copy schemaVersion : 1
commandMode : COMMAND_REDIRECT_NOARG
command : easy
redirectTo : difficulty easy
Next, let's create another one for the /gamemode survival
command.
Copy {
"schemaVersion" : 1 ,
"commandMode" : "COMMAND_REDIRECT_NOARG" ,
"command" : "gm 0" ,
"redirectTo" : "gamemode survival"
}
Copy schemaVersion = 1
commandMode = "COMMAND_REDIRECT_NOARG"
command = "gm 0"
redirectTo = "gamemode survival"
Copy schemaVersion : 1
commandMode : COMMAND_REDIRECT_NOARG
command : gm 0
redirectTo : gamemode survival
Examples
Time Command
Day
Copy {
"schemaVersion" : 1 ,
"commandMode" : "COMMAND_REDIRECT_NOARG" ,
"command" : "day" ,
"redirectTo" : "time set day"
}
Copy schemaVersion = 1
commandMode = "COMMAND_REDIRECT_NOARG"
command = "day"
redirectTo = "time set day"
Copy schemaVersion : 1
commandMode : COMMAND_REDIRECT_NOARG
command : day
redirectTo : time set day
Night
Copy {
"schemaVersion" : 1 ,
"commandMode" : "COMMAND_REDIRECT_NOARG" ,
"command" : "night" ,
"redirectTo" : "time set night"
}
Copy schemaVersion = 1
commandMode = "COMMAND_REDIRECT_NOARG"
command = "night"
redirectTo = "time set night"
Copy schemaVersion : 1
commandMode : COMMAND_REDIRECT_NOARG
command : night
redirectTo : time set night
Game Mode Command (1.19.2 and below)
Survival
Copy {
"schemaVersion" : 1 ,
"commandMode" : "COMMAND_REDIRECT_NOARG" ,
"command" : "gm 0" ,
"redirectTo" : "gamemode survival"
}
Copy schemaVersion = 1
commandMode = "COMMAND_REDIRECT_NOARG"
command = "gm 0"
redirectTo = "gamemode survival"
Copy schemaVersion : 1
commandMode : COMMAND_REDIRECT_NOARG
command : gm 0
redirectTo : gamemode survival
Creative
Copy {
"schemaVersion" : 1 ,
"commandMode" : "COMMAND_REDIRECT_NOARG" ,
"command" : "gm 1" ,
"redirectTo" : "gamemode creative"
}
Copy schemaVersion = 1
commandMode = "COMMAND_REDIRECT_NOARG"
command = "gm 1"
redirectTo = "gamemode creative"
Copy schemaVersion : 1
commandMode : COMMAND_REDIRECT_NOARG
command : gm 1
redirectTo : gamemode creative
Adventure
Copy {
"schemaVersion" : 1 ,
"commandMode" : "COMMAND_REDIRECT_NOARG" ,
"command" : "gm 2" ,
"redirectTo" : "gamemode adventure"
}
Copy schemaVersion = 1
commandMode = "COMMAND_REDIRECT_NOARG"
command = "gm 2"
redirectTo = "gamemode adventure"
Copy schemaVersion : 1
commandMode : COMMAND_REDIRECT_NOARG
command : gm 2
redirectTo : gamemode adventure
Spectator
Copy {
"schemaVersion" : 1 ,
"commandMode" : "COMMAND_REDIRECT_NOARG" ,
"command" : "gm 3" ,
"redirectTo" : "gamemode spectator"
}
Copy schemaVersion = 1
commandMode = "COMMAND_REDIRECT_NOARG"
command = "gm 3"
redirectTo = "gamemode spectator"
Copy schemaVersion : 1
commandMode : COMMAND_REDIRECT_NOARG
command : gm 3
redirectTo : gamemode spectator
Difficulty Command
Peaceful
Copy {
"schemaVersion" : 1 ,
"commandMode" : "COMMAND_REDIRECT_NOARG" ,
"command" : "peaceful" ,
"redirectTo" : "difficulty peaceful"
}
Copy schemaVersion = 1
commandMode = "COMMAND_REDIRECT_NOARG"
command = "peaceful"
redirectTo = "difficulty peaceful"
Copy schemaVersion : 1
commandMode : COMMAND_REDIRECT_NOARG
command : peaceful
redirectTo : difficulty peaceful
Easy
Copy {
"schemaVersion" : 1 ,
"commandMode" : "COMMAND_REDIRECT_NOARG" ,
"command" : "easy" ,
"redirectTo" : "difficulty easy"
}
Copy schemaVersion = 1
commandMode = "COMMAND_REDIRECT_NOARG"
command = "easy"
redirectTo = "difficulty easy"
Copy schemaVersion : 1
commandMode : COMMAND_REDIRECT_NOARG
command : easy
redirectTo : difficulty easy
Normal
Copy {
"schemaVersion" : 1 ,
"commandMode" : "COMMAND_REDIRECT_NOARG" ,
"command" : "normal" ,
"redirectTo" : "difficulty normal"
}
Copy schemaVersion = 1
commandMode = "COMMAND_REDIRECT_NOARG"
command = "normal"
redirectTo = "difficulty normal"
Copy schemaVersion : 1
commandMode : COMMAND_REDIRECT_NOARG
command : normal
redirectTo : difficulty normal
Hard
Copy {
"schemaVersion" : 1 ,
"commandMode" : "COMMAND_REDIRECT_NOARG" ,
"command" : "hard" ,
"redirectTo" : "difficulty hard"
}
Copy schemaVersion = 1
commandMode = "COMMAND_REDIRECT_NOARG"
command = "hard"
redirectTo = "difficulty hard"
Copy schemaVersion : 1
commandMode : COMMAND_REDIRECT_NOARG
command : hard
redirectTo : difficulty hard