How to Make a Command in Minecraft (Mod Maker guide)
Learn how to create a custom chat Command in 9Minecraft Mod Maker right in your web browser. Trigger special actions whenever players type your text into the chat.
Open 9Minecraft Mod Maker
Open your web browser and go to the 9Minecraft Mod Maker studio. Because it runs right in your browser, there is nothing to download or install.
Open an existing workspace or create a new one. Make sure your workspace is set to a supported version: NeoForge 26.1.2 or NeoForge 1.21.1.
Add a Command Element
Inside your workspace, click the green plus button to add a new mod element.
Look in the Logic & code group and select Command. Give your new element a clear name to open the editor.
Set the Command Name
Find the field called Command name (without /).
Type the word that players will write after the slash in chat to use your command, similar to standard commands like gamemode, give, or setblock.
Choose the Execution Permission Level
Locate the Execution permission level field. This sets the minimum permission level a player needs to run your command.
Level 1 is the most basic permission level, and level 4 is the highest (server OP level). You can also disable the permission requirement so the command works even in a world where cheats are turned off.
Select the Command Type
Find the Type field to decide how and where your command can be used.
Choose Standard if you want the command to work everywhere like the give command. Choose Singleplayer only for singleplayer worlds, Multiplayer only for multiplayer servers, or Clientside if the command only performs actions on the client side.
Save and Test with Build & Run
Once you have filled in the fields, save your Command element.
Click the Build & run button in the studio to test your mod. When the game opens, open the chat, type a slash followed by your command word, and see it work.
Export Your Mod
When you are happy with how your command works, go back to the studio and export your mod file.
You can now share your finished mod with friends or use it in your own Minecraft worlds.
Tips
- Do not type a slash in the Command name (without /) field; Minecraft adds the slash automatically in the chat.
- If you want any player to use your command in survival worlds without cheats enabled, disable the permission requirement in the Execution permission level field.
- Use the Standard option in the Type field for most normal commands so they work in both singleplayer and multiplayer.
- Check that your workspace is using NeoForge 26.1.2 or NeoForge 1.21.1 so the Command element works properly.