dontusecommant
This compact addon, built on just two Java files, is designed to block the use of game commands through editing configuration files. It's perfect for game pack authors who want to prevent cheating among players.
After installing the mod, blocked commands become unavailable to all players, regardless of their game mode. Even server operators cannot use these commands. However, if the mod is installed on a server, commands can still be executed through the console.
Minecraft versions from 1.18.2 to 1.20.1 are theoretically supported.
Usage
Upon entering the game, a DUC.json file is automatically created in the configuration folder:
-
Open the file (you can use regular Notepad), and you'll see the following structure:
-
Enter the commands you want to block in JSON format. For example:
{ "black": { "command0": "tp", "command1": "gamemode", "command2": "give" } }
- Restart the client to apply the changes.
Note: Each command is numbered sequentially, doesn't use a slash ("/"), and is separated by commas, except for the last command in the list.
Additional Information
For large servers, it's better to use LuckPerms - this mod is not intended for serious server use. If you want to block all commands at once, consider using No Cheat.
Limited versions are supported due to the use of MCR development environment. Pack authors can change the mod's display name to "[Dependency]xxx (Do Not Delete)".