Skip to main content
Gamerules change how a Minecraft world behaves, for example whether players keep their inventory or the day/night cycle runs. Set one with gamerule <name> <value> in the console, such as gamerule keep_inventory true. Since Minecraft 1.21.11, gamerules use snake_case names (keep_inventory, advance_time), while 1.21.10 and older use the old camelCase names (keepInventory, doDaylightCycle).

How to change a gamerule

1

Check your version

Open Version Changer. The status line shows your version, for example Currently installed: Paper 26.1.1 (#29). Use the new names for 1.21.11 and newer.
2

Run the command

In the Console, type the gamerule and value, for example:
3

Check the value

Type the gamerule without a value to see its current setting: gamerule keep_inventory.
Gamerules apply straight away. You don’t need to restart.

Most-used gamerules

Example commands:

Which gamerules changed in 1.21.11?

In Minecraft 1.21.11 every gamerule was renamed from camelCase to a namespaced snake_case ID, for example keepInventory became minecraft:keep_inventory. You can type the name without minecraft:. Some rules got new names, not just new spelling:

Which server settings became gamerules?

From Minecraft 1.21.9, some settings moved from server.properties to gamerules: Example: gamerule pvp false turns off player-versus-player combat. See server.properties explained.
Set each with gamerule <name> <value> in the console.

Frequently asked questions

How do I turn on keep inventory on my server?

On 1.21.11 and newer, run gamerule keep_inventory true in the console. On older versions, run gamerule keepInventory true.

How do I make one player skip the night?

Run gamerule players_sleeping_percentage 1 (or playersSleepingPercentage on older versions). With 1%, one sleeping player is enough unless more than 100 players are online.

Why does my gamerule say “Incorrect argument”?

You used the old name on a new version, or the other way round. Check your version in Version Changer and use the matching name from the table.

Do gamerules reset after a restart?

No. Gamerules are saved in the world. They do reset if you create a new world, for example after changing the seed.

Do gamerules apply to the Nether and End?

Yes. Gamerules apply to the whole world save, including its dimensions.

Minecraft server guide

Every Minecraft guide in one place.

Server commands

Admin commands for the console.

server.properties explained

Settings that live in the file.

Enable command blocks

Turn command blocks on.
Checked against the official Minecraft Java Edition 1.21.11 release notes on 29 October 2026, and the console steps tested on our Game Panel (Minecraft 26.1, Paper and Fabric). Gamerules may change in future Minecraft versions.

Need Extra Help?

If you encounter any issues, our support team is ready to assist:

Save on Your Hosting

Ready to upgrade your hosting? Use code KB20 at checkout for 20% off your first order!

Last Updated: October 2026