Updated 23 October 2026. Facts on this page come from minecraft.wiki, minecraft.net and the live Artemis PvP server; sources are listed at the bottom.

Minecraft Game Rules: keep_inventory and More
Game rules are world settings you change with /gamerule
How do you change a game rule?
Type /gamerule <rule> <value> (cheats or operator rights needed), or use the Edit Game Rules screen when creating a world on Java, or the world settings on Bedrock. On Bedrock some rules can be changed without cheats, which keeps achievements on.
What do the main game rules do?
| Java (since 1.21.11) | Bedrock | What it does | Default |
|---|---|---|---|
| keep_inventory | keepinventory | Keep items and experience when you die | false |
| mob_griefing | mobgriefing | Lets creepers, endermen, ghasts, withers and other mobs change blocks | true |
| advance_time | dodaylightcycle | Day-night cycle and moon phases move on | true |
| spawn_phantoms | doinsomnia | Phantoms can spawn at night | true |
| natural_health_regeneration | naturalregeneration | Health regenerates when hunger is full enough | true |
| players_sleeping_percentage | playerssleepingpercentage | Percent of players who must sleep to skip the night | 100 |
| fall_damage | falldamage | Players take fall damage | true |
| random_tick_speed | randomtickspeed | How fast crops grow, leaves decay and so on | 3 (Java), 1 (Bedrock) |
| respawn_radius | spawnradius | How far from world spawn new or bed-less players appear | 10 |
Why did keepInventory stop working on Java?
It did not stop working; it was renamed. In 1.21.11 Java's game rules moved to snake_case names, and some were renamed outright:
- keepInventory to keep_inventory, mobGriefing to mob_griefing
- doDaylightCycle to advance_time, doWeatherCycle to advance_weather
- doInsomnia to spawn_phantoms, doMobSpawning to spawn_mobs
- naturalRegeneration to natural_health_regeneration, spawnRadius to respawn_radius
- disableRaids to raids (with the value flipped)
What can you do with game rules?
- keep_inventory true: dying no longer costs you your items or experience.
- advance_time false: the time of day stops moving; spawn_phantoms false: no phantoms.
- players_sleeping_percentage: set it below 100 so not every player has to sleep to skip the night.
- natural_health_regeneration false: no healing from a full hunger bar, as in UHC; see UHC.
Who sets the game rules on a server like ArtemisPvP?
Frequently asked questions
How do you turn on keep inventory in Minecraft?
Java: /gamerule keep_inventory true (keepInventory before 1.21.11). Bedrock: /gamerule keepinventory true.
How do you stop phantoms?
Java: /gamerule spawn_phantoms false. Bedrock: /gamerule doinsomnia false.
Sources
Every fact on this page was checked against these pages; the wording is ours.