Minecraft – How to turn cheats on or off

minecraft-java-edition

How can you turn on or off the cheats after you make an offline server?My brother did something in settings but I can't find it.

Best Answer

On a multiplayer server:

To turn on cheats:

  1. Type op <Your username> in the console.
  2. Done.

To turn off cheats:

  1. Type /deop <Your username>
  2. Done.

On a singleplayer world:

To turn on cheats:

Using the built-in LAN server:

  1. Pause the game.
  2. Click on Open to LAN.
  3. In the options, change Allow Cheats: false to true (click on it).
  4. Open the server.

Changing your save file:

  1. Close your world.
  2. Using NBTEdit, open your save file (%AppData%/.minecraft/saves/<World Name>/save.dat)
  3. Change the NBT node AllowCommands from 0 to 1.
  4. Save and reopen the world.

To turn off cheats:

Using the built-in LAN server:
Note: This only works on players who connect to this world, not you.

  1. Pause the game.
  2. Click on Open to LAN.
  3. In the options, change Allow Cheats: true to false (click on it, if it already displays Allow Cheats: false, obviously don't click).
  4. Open the server.

Changing your save file:

  1. Close your world.
  2. Using NBTEdit, open your save file (%AppData%/.minecraft/saves/<World Name>/save.dat)
  3. Change the NBT node AllowCommands from 1 to 0.
  4. Save and reopen the world.
Related Topic