In Minecraft, is there a way to turn off editing? In other words, is there a way to temporarily turn off placing or destroying blocks?

1 Answer 1


You can use commands in Minecraft to change the gamemode, assuming cheats are enabled for the world/server. You can temporarily enable cheats on single-player worlds by opening the game to LAN and turning Allow Cheats to ON.

/gamemode adventure or /gamemode spectator

Adventure mode allows interactions with mechanisms and trading, but stop blocks from being placed or destroyed. Spectator mode makes players invisible, disables inventory interaction, and other things.

Changes to the gamemode will save to the world.

MrLemon noted that it only applies to the user who ran the command. Use /gamemode <gamemode> [target] to target specific players. Using @a as the [target] will target all players.

Use /defaultgamemode <gamemode> to change the gamemode for new players entering the server.

  • Thank you! Just checking, this command only changes settings in a specific world, right? Commented Jul 24, 2015 at 4:51
  • In single-player, cheats need to be enabled for the world to use commands like these. You can bypass this restriction by temporarily opening the game to LAN. When changing the gamemode, it will save with the world. If opening the game to LAN, you can select the default gamemode there for players. Commented Jul 24, 2015 at 4:58
  • 1
    Might be worth noting that this command affects the player that runs it. /gamemode [target] adventure affects [target]. Use @a to target every player on a server.
    – MrLemon
    Commented Jul 24, 2015 at 8:52
  • @MrLemon Thanks for the heads up; I will edit some stuff in to make it in-depth. Commented Jul 24, 2015 at 17:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .