Minecraft Java and Bedrock Gamerule Command Generator
Use this Gamerule Command Generator to turn on, turn off, and fine-tune your world's rules on Minecraft Java and Bedrock Edition. Search by name, filter by category (World, Player, Mobs, Damage and Technical) and generate /gamerule commands ready to copy.
1.21.11 / 26.1, Java renamed
every gamerule to snake_case (e.g. keep_inventory).
Bedrock still uses the classic camelCase names
(e.g. keepInventory). Pick the correct edition below before copying the command.
Select your Minecraft edition:
Last Generated Command
No command generated yetChanged Commands
Turn on a rule in the list above to generate commands.
Want a cheap, lag-free Minecraft server?
I recommend Sparked Host: affordable plans, great performance, an easy panel and fast support.
🚀 Create a server on Sparked HostHow to use the Gamerule command in Minecraft
The Gamerule command controls global world rules, such as fall damage, mob spawning, the day/night cycle, and much more. It's essential for server admins or anyone who wants to customize a map's experience.
The basic format is:
/gamerule keep_inventory true
This example (Java 1.21.11+) makes players keep their inventory when they die.
Gamerule Command Examples (Java 1.21.11+ / 26.1+)
Keep inventory on death
/gamerule keep_inventory true
Stop mobs from destroying blocks
/gamerule mob_griefing false
Stop the day/night cycle
/gamerule advance_time false
Increase plant growth speed
/gamerule random_tick_speed 10
Gamerule Command Examples (Bedrock)
Keep inventory on death
/gamerule keepInventory true
Stop mobs from destroying blocks
/gamerule mobGriefing false
Frequently Asked Questions
What is the gamerule command in Minecraft?
The /gamerule command turns rules that control world behavior on, off, or to a specific value, such as fall damage, mob spawning, and the day/night cycle.
Are gamerule names the same on Java and Bedrock?
Not always. Starting with Java update 1.21.11 (26.1), every gamerule was renamed to snake_case, such as keep_inventory. Bedrock still uses the old camelCase names, such as keepInventory.
Why did my old gamerule command stop working on Java?
Starting with version 1.21.11 (26.1), Java renamed every gamerule. Old names like keepInventory or doDaylightCycle are no longer recognized; use the new names, such as keep_inventory and advance_time.
How do I reset a gamerule to its default value?
Click the reset button next to the changed rule in the generator, or type /gamerule mob_griefing true in-game with the desired default value.
How can I see a gamerule's current value in-game?
Type /gamerule mob_griefing with no value, and the game will show the current value set in the world.