# Turn on cheats in a Minecraft world you already made, permanently

> Markdown version of https://stella.sh/how/game-mods/turn-on-cheats-in-minecraft-world for agents and LLMs.
> Open to LAN turns cheats on only until you quit. To keep them, set allowCommands in level.dat with an NBT editor, or let Stella (stella.sh) change that one setting.

The quick way: open the world, press Esc, Open to LAN, set Allow Commands to On and start the LAN world. It lasts until you quit, so you redo it every session. To keep cheats on, close Minecraft and set `allowCommands` to 1 in the world's `level.dat` with an NBT editor such as the free NBTExplorer. Stella (stella.sh) backs up that file and changes just that one setting.

- Checked: 13 November 2026
- Stella does it on: Windows, Mac, Linux

## Stella doing it

Recorded 13 November 2026 on Linux (Omarchy) with Claude Code with Opus, on a Claude plan.
Result: Done in under 1½ minutes. Checked afterwards against an answer key written before the run: Maple Hollow's level.dat still loads with cheats on, every other setting unchanged (game mode, hardcore, seed, player, rules), region, player and data files untouched, the other two worlds untouched, and a copy of the original level.dat kept. File-level check only: no Minecraft account was used and the game was never launched. The worlds are stand-ins with real level.dat files, made for this run. The work is sped up 3×.

Video (48 s): https://stella.sh/media/proofs/game-mods/turn-on-cheats-in-minecraft-world/proof.mp4

Transcript:

- 0:00 Stella on a Linux computer with three Minecraft worlds.
- 0:01 The prompt: turn cheats on for good in Maple Hollow, and don't touch the other worlds.
- 0:17 Stella replies that it will back up the settings file first and the world stays survival.
- 0:23 Making the change, sped up 3×.
- 0:34 Done: cheats on in Maple Hollow, still survival on Normal, the other worlds untouched, with how to undo it.

What Stella does:

1. Finds Maple Hollow among your worlds
2. Backs up its `level.dat` in the world folder, with a name that says what it's for
3. Changes only the cheats setting (`allowCommands`) to on, leaving the game mode, difficulty, seed, your inventory and the game rules as they were
4. Leaves your other two worlds untouched
5. Tells you how to undo it, and to close the world first if it's open, because the game can overwrite the change when it saves

## The prompt to paste

```text
I made a survival world called Maple Hollow in Minecraft without turning cheats on. Can you turn cheats on for that world for good? Don't touch my other worlds.
```

## Do it yourself

1. **For one session: Open to LAN.** Load the world, press Esc, choose Open to LAN, set Allow Commands to On and click Start LAN World. Commands work until you leave the world. Next time, do it again.
2. **Permanent: close Minecraft and back up.** Quit the game completely, then copy the world's `level.dat` (in `saves/<world name>`) somewhere safe. Minecraft rewrites this file on exit, so an edit made with the game open is lost.
3. **Open level.dat in an NBT editor.** On Windows, the free NBTExplorer (from its GitHub page) opens it directly. On a Mac, NBTExplorer's build is old; a web NBT editor that runs in your browser is the usual choice. The file is gzip-compressed; the editor handles that.
4. **Set allowCommands to 1.** Expand Data and find `allowCommands`. Change it from 0 to 1 and keep its type (a byte). Change nothing else. Save, keeping gzip compression.
5. **Open the world.** Start Minecraft and load the world. Type `/time set day` to check. If the world won't load, put your backup `level.dat` back.

## Where Stella stops

- Checked at file level only: no Minecraft account was used and the game wasn't launched.
- Turning cheats on in a survival world disables advancements and achievements for that world. That's the game's rule.
- Java Edition only. Bedrock has a cheats switch in the world's settings, so no file edit is needed.
- Minecraft must be closed (or the world quit) when the change is made; the game rewrites level.dat when it saves.
- Recorded on Linux. On Windows and Mac the saves folder is elsewhere; the file and the setting are the same. Only world names and the settings file's values go to the AI model.

## Questions

**Can I turn on cheats after creating a world in Java?**
Yes. Open to LAN does it for one session; changing `allowCommands` in level.dat does it for good.

**Will turning on cheats stop achievements?**
Yes. Once a world has cheats on, the game stops granting advancements and achievements there, even if you turn them off again.

**Can I change a hardcore world to survival?**
The same file holds a `hardcore` setting. Ask Stella to set it to off (or change it in an NBT editor), and back the world up first: [back up Minecraft worlds](https://stella.sh/how/game-mods/back-up-minecraft-worlds).

**My world won't open after editing level.dat. What now?**
Put your backup back. If you don't have one, the game's own `level.dat_old` usually works: see [fix a corrupted Minecraft world](https://stella.sh/how/game-mods/fix-corrupted-minecraft-world).

**Is Stella free for this?**
Yes. Free with the ChatGPT or Claude plan you already have. Sign in with your ChatGPT plan, or use your Claude plan through Claude Code, and this task costs nothing extra. New accounts also get a small free trial of Stella’s own models.

**Can I control what Stella changes on my computer?**
Yes. Stella works on Windows, Mac and Linux with your own files and shows each step in the chat, so you can watch it and stop it at any point. Tell it what it may not do, as the prompts on these pages do (“don't delete anything without asking”). In the Downloads recording it deleted nothing until it was told to go ahead. It also refuses commands that would wipe a whole disk, your home folder or system folders.

Sources: [Minecraft Wiki: Java Edition level format](https://minecraft.wiki/w/Java_Edition_level_format), [Minecraft Wiki: Commands](https://minecraft.wiki/w/Commands), [NBTExplorer on GitHub](https://github.com/jaquadro/NBTExplorer).

## Related problems

- [Back up all your Minecraft worlds and move them to a new computer](https://stella.sh/how/game-mods/back-up-minecraft-worlds.md)
- [Fix a Minecraft world that won't load after a crash](https://stella.sh/how/game-mods/fix-corrupted-minecraft-world.md)
- [Install a downloaded Minecraft map so it shows up in Singleplayer](https://stella.sh/how/game-mods/install-minecraft-map.md)
- [Install Sodium and Iris on Minecraft 1.21 (Fabric)](https://stella.sh/how/game-mods/install-sodium-iris-minecraft-1-21-fabric.md)
- [Minecraft modpack crashing with exit code 1? Find the real error](https://stella.sh/how/game-mods/minecraft-modpack-exit-code-1.md)
- [How to install a Minecraft resource pack that isn't showing up](https://stella.sh/how/game-mods/install-minecraft-resource-pack.md)

Get Stella: https://stella.sh/download. Free with the ChatGPT or Claude plan you already have.
