Celeb Glow
general | April 26, 2026

How can I disable commands after enabling adventure mode? [duplicate]

I'm trying the new features included in Minecraft snapshots and I just discovered that jeb_ is adding adventure mode! Yay, finally!

The goal is to create adventure maps in which the player won't be able to destroy any blocks. To create such a map, the easiest way is to create a world in creative mode with commands activated, create the map and then use the /gamemode 2 command to change the game mode to adventure.

My problem is that it will still allow the player to use the commands when he is in the adventure!

Is there a "command to disable commands"? So that after the game mode changing, the right to perform commands is revoked.

Is there a way to change the game mode without commands? So that the original map is created without command options and then change the mode "from outside".

Important note: Of course, I know there are mods and software that can do that, I'm asking if there is a way to do that in Vanilla Minecraft.

4

2 Answers

No, this is not possible in an un-modded, single-player game. There's certainly nothing you can do to a map file to force constraints on the player playing it.

Given that people have been playing adventure maps for ages without the special mode, trust has worked very effectively up to this point :-)

1

As legacy points out, there is no built-in command to disable commands in the Minecraft snapshots. However, you can use NBTedit to retroactively disable commands when you're ready to release you map.

Simply open your level.dat file in NBTedit and change the value of allowCommands to 0.

NBTedit