To enable cheats in an existing Minecraft Java Edition world, load it, press Esc, select World Options and turn on Allow Commands, an option Mojang added in Java 26.2. In Bedrock Edition, open the world’s settings, go to the Cheats section and turn cheats on, but know that this permanently disables achievements for that world, even if you switch cheats off later. Below we walk through both editions step by step, the workaround for older Java versions, how Realms and servers handle it, and how to give your friends command access too.
This guide is current for Minecraft Java Edition 26.3 and Bedrock Edition 26.50.
How to Enable Cheats in an Existing Java World
For years, Java players who skipped the setting at world creation had to rely on a temporary trick. Since Java 26.2, it is a proper menu option:
- Load the world from Singleplayer.
- Press Esc to open the game menu.
- Select World Options. In Java 26.3 the button sits where Open to LAN used to be.
- Turn on Allow Commands in the General section.
- Return to the game and press T or / to start typing commands.
Mojang’s guide to commands confirms it: if commands were not enabled when the world was created, you can turn them on later from the World Options screen. Two limits apply. Mojang’s 26.2 notes say the button is not available in Hardcore worlds, and only the world’s host sees it.
The same General section in 26.3 also holds Personal Game Mode, Default Game Mode, Difficulty and Edit Game Rules, so you can change modes or rules from the menu without typing anything. Java Edition has no achievements to lose, and advancements keep working with commands on.
Older Java Versions: The Open to LAN Trick
If you play a version older than 26.2, such as a modpack, the long-standing workaround still works:
- Press Esc and select Open to LAN.
- Set the cheats option (Allow Cheats, or Allow Commands in later versions) to ON.
- Select Start LAN World.
This only lasts until you quit the world, so you repeat it each session, though anything you spawn or change with commands is saved. While it is open, players on your home network can see the world. The permanent fix for old versions is editing the allowCommands value in the world’s level.dat file with a third-party NBT editor. That risks corrupting the save, so back the world up first if you try it.
How to Enable Cheats in an Existing Bedrock World
These steps are the same on Windows, Xbox, PlayStation, Switch and mobile.
From the main menu:
- Select Play and open the Worlds tab.
- Select the pencil icon next to the world.
- Open the Cheats tab and turn on cheats.
- Confirm the warning about achievements.
While playing: pause, select Settings, find the world options under Game Settings, and turn on cheats in the same way.
The achievement warning is serious. Mojang says enabling cheats permanently stops players from unlocking achievements in that world, even if you turn cheats off again later. Mojang’s creator documentation adds that setting the default game mode to Creative also activates cheats. If achievements matter, make a copy of the world and enable cheats on the copy.
If commands still fail, you may need operator permission. Per Mojang’s creator documentation, it is on by default in new worlds but may need turning on in older ones: pause, select the icon to the right of your name in the player list, and enable operator commands.
Realms and Servers
- Bedrock Realms: the owner or an admin opens the Realms tab, the Realms Hub, then World, Slots and Edit World. Per Mojang’s help center, that screen is where Realm cheats are turned on.
- Java Realms: the owner can already use commands and can manage other players’ permissions from the Realm’s Configure menu.
- Servers on either edition: commands belong to operators. A server admin can make you one with the op command in the server console.
How to Give Friends Command Access
Turning on cheats for yourself does not automatically give guests the same power:
- Java 26.3: in World Options, the Multiplayer section has a Command Access setting for players who join your world.
- Java 26.2: open the world to LAN, and under Settings for Other Players, set Allow Commands.
- Bedrock: pause, select the permission icon next to a player’s name, and enable operator commands for them.
Our guide to playing with friends covers getting everyone into the world first.
Commands Worth Trying First
- Keep your items on death with the rule in our keep inventory guide.
- Find structures with
/locate, handy for tracking down trial chambers. - Speed up random ticks to age copper or grow crops faster, as explained in our copper oxidation guide.
- Check where you are alongside the tips in our guide to showing coordinates.
Find every other guide on our Minecraft guides hub.
Frequently Asked Questions
Does enabling cheats disable achievements? On Bedrock, yes, permanently for that world. Java Edition has no achievements, and its advancements are unaffected.
Can I turn cheats off again? Yes, with the same toggle on either edition. On Bedrock, achievements stay disabled for that world anyway.
Why is there no Allow Commands button in my Java world? Either the world is Hardcore, you are not the host, or you are on a version older than 26.2. Use the Open to LAN trick on older versions.
How do I enable cheats on PS5, Xbox or Switch? Consoles run Bedrock Edition, so edit the world with the pencil icon or pause and open Settings, then turn on cheats in the Cheats section.
Is the Java Open to LAN method permanent? No. It lasts until you close the world. On 26.2 and later, use World Options instead.