Now that you are familiar with the structure of the mod, we will begin covering the basic commands that are essential for assisting in the testing of command aliases when writing them.
/commandaliases reload
Output:
Reloading all Command Aliases!
Reloaded all Command Aliases!
Console Output:
[16:14:48] [Render thread/INFO] (Minecraft) [System] [CHAT] Reloading all Command Aliases!
[16:14:48] [Server thread/INFO] (Command Aliases)
commandaliases
[16:14:48] [Server thread/INFO] (Command Aliases) Registered/Reloaded all your commands :P, you can now single command nuke!
[16:14:48] [Render thread/INFO] (Minecraft) [System] [CHAT] Reloaded all Command Aliases!
If we then run the previous command /commandaliases reload again, we will be able to see the structure of the output.
The output above may vary as more changes may have been made to the Essentials Command Aliases Collection in the future.
Supported Formats
Currently, Command Aliases support multiple data formats, including the following:
JSON - .json
JSON5 - .json5
TOML - .toml
YAML - .yaml or .yml
Creating a Command Alias
To begin creating our first command aliases and becoming familiar with the format and types of command aliases mode, we will start by creating a basic redirect without arguments using the COMMAND_REDIRECT_NOARG command mode.
To create our first command aliases file with our chosen data format, we will start by creating a file named survival.json placed in .minecraft/config/commandaliases/. Depending on the preferred format, the proper extension should be used accordingly.
We must also define our schemaVersion and the command mode we will be using within our chosen data format.
As the name of the alias indicates, we are creating an alias for the /gamemode survival command. We will need to define our command name and redirect to fields accordingly.
To complete the process, we can reload our command aliases using the /commandaliases reload command, which should register our alias and allow us to verify it using the output of the console.
Console Output:
[18:55:06] [Render thread/INFO] (Minecraft) [System] [CHAT] Reloading all Command Aliases!
[18:55:06] [Server thread/INFO] (Command Aliases)
commandaliases
└── survival.toml - Successfully loaded
[18:55:06] [Server thread/INFO] (Command Aliases) Registered/Reloaded all your commands :P, you can now single command nuke!
[18:55:06] [Render thread/INFO] (Minecraft) [System] [CHAT] Reloaded all Command Aliases!
To test our work, let's try using the /survival command. If everything was done correctly, the command alias should be working as intended.
At present, since our directory of command aliases files is empty, we receive a blank structure. To demonstrate how this would appear, I will be downloading the files from and copying them to .minecraft/config/commandaliases or a similar path if you are running a server installation.
We can find other command modes on the page.
Congratulations, you have now created your first command alias. You can learn more about different command modes on the page.