11

How can you enable or disable cheats after you make an offline server?

My brother did something in the settings menu but I can't find it.

0

4 Answers 4

20

On a multiplayer server:

On a multiplayer server, players can use cheats if they are a server operator.

To make a player an operator:

  1. Type /op <username> in the console, of course replacing the appropriate part with the player's username.
  2. Press Enter to submit. Done.

To revoke operator status:

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

On a singleplayer world:

On a singleplayer world, cheat settings are deliberately not available on purpose. This is to discourage, well, cheating. However, there are workarounds to enable cheats on a singleplayer world:

Using the built-in LAN server:

When you open a world to the built-in LAN server, you get a chance to configure settings such as cheats. Settings configured in this menu will only apply until the world is closed.

  1. Pause the game.
  2. Click Open to LAN.
  3. Select your desired setting for cheats from the buttons.
  4. Open the server.

Note: If your world has cheats disabled, enabling cheats here will enable cheats for you. However, disabling cheats on a cheats-enabled world only affects other players who join, not you.

Manually editing your save file

You need an NBT editor. Need one? Try NBT Studio.

  1. Close your world.
  2. Using NBTEdit, open your save file (%APPDATA%/.minecraft/saves/<worldName>/level.dat)
  3. Change the NBT tag AllowCommands. Use 1 to enable or 0 to disable cheats.
  4. Save, then reopen the world.
3
  • 1
    Wow, thanks. Shout out to all the people telling me this wasn't possibly. Let alone that simple! Commented Apr 2, 2018 at 20:02
  • Then what is op-permission-level in server.properties and how does it work?
    – NeilG
    Commented Aug 13, 2021 at 12:14
  • "Note: If your world has cheats disabled, enabling cheats here will enable cheats for you. However, disabling cheats on a cheats-enabled world only affects other players who join, not you." @aytimothy You are a godsend ! Thanks a lot. Everybody playing Minecraft today (that I talked with) have no idea how this works :)
    – Riva
    Commented May 27 at 18:55
2

You can simply deop yourself. /deop {PlayerName} and boom, no more commands like /gamemode 1

4
  • Player name as in the what you called the server or your profile?
    – collop1
    Commented Jul 28, 2016 at 8:00
  • Your profile name, as in the name in the launcher (Hello, TheEnderCrafter9) as an example
    – Roke
    Commented Jul 28, 2016 at 12:11
  • 1.13 syntax: /gamemode creative
    – pppery
    Commented Jul 13, 2019 at 0:15
  • Not on LAN world
    – Riva
    Commented May 27 at 17:49
1

If you're wondering how to make it so that no one can use any commands, then...

  1. Make the map open to LAN
  2. Turn cheats to "Off"
  3. End the LAN server and you won't be able to use cheats.

This works the other way around if you wish to turn the cheats back on.

1

For Permanent allow command without LAN MODE use this:

NTB EXPLORER for change config on the world.

Next, open the program and go to

C:\Users\ *"MY USER"* \AppData\Roaming\.minecraft\saves

Select the world folder and in the file "level.dat" search "AllowCommands" and change 0 to 1 (0 = false, 1 = true)

Make this change with minecraft close.

You must log in to answer this question.

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