Open your world settings
Turn on “Allow Cheats” or “Activate Cheats”
If creating a new world, enable cheats before starting the world
In Java Edition, open the world to LAN and set “Allow Cheats” to On if needed
In Bedrock Edition, enable cheats in the world settings before loading the world
Save the settings and return to the game
Use the chat/command window to enter cheat commands
