Players
How to turn on keep inventory and other game rules on a Minecraft server
Game rules are the switches of a Minecraft world: whether players keep their items when they die, whether creepers blow holes in the ground, whether the sun moves. Keep inventory is the one server owners ask about most, and it takes one click.
Since Minecraft 1.21.11 the game rules have new names, so a command copied from an older guide often fails with "Incorrect argument for command". Below are both names for every rule.
Turn on keep inventory from the World tab
- Start the server. Game rules live in the running world, so the card needs the server online.
- Open the World tab and find the Game rules card.
- Click Show game rules. The panel reads the current value of each rule.
- Switch on Keep inventory.
- Click Save.
The change works straight away, without a restart, and the panel sets it in the overworld, the Nether and the End at once. Players keep their items and their experience when they die.
Reading the rules sends one short question per rule to the console, so you will see those lines appear there. That is the panel at work, not a problem.
Every game rule in the panel
These are the switches on the Game rules card, with the name to use in a command. Servers on 1.21.11 or newer, including every 26.x version, use the new name; older servers use the old one.
| Switch in the panel | What it does | Name since 1.21.11 | Older name |
|---|---|---|---|
| Keep inventory | Players keep items and experience when they die | keep_inventory | keepInventory |
| Mob griefing | Creepers break blocks, endermen pick them up, villagers farm | mob_griefing | mobGriefing |
| PvP | Players can damage each other | pvp | none, use the PvP setting |
| Day and night cycle | Time moves on; off freezes the time of day | advance_time | doDaylightCycle |
| Weather changes | Rain and storms come and go; off keeps the current weather | advance_weather | doWeatherCycle |
| Mobs spawn | Animals and monsters spawn by themselves | spawn_mobs | doMobSpawning |
| Monsters spawn | Hostile mobs spawn; animals are not affected | spawn_monsters | none, use Spawn monsters |
| Phantoms | Phantoms attack players who have not slept | spawn_phantoms | doInsomnia |
| Pillager patrols | Groups of pillagers roam the world | spawn_patrols | doPatrolSpawning |
| TNT explodes | Lit TNT blows up; off makes it harmless | tnt_explodes | tntExplodes |
| Fall damage | Players take damage from falling | fall_damage | fallDamage |
| Natural regeneration | Health comes back when players are well fed | natural_health_regeneration | naturalRegeneration |
| Instant respawn | Skip the death screen | immediate_respawn | doImmediateRespawn |
| Death messages | Chat shows how a player died | show_death_messages | showDeathMessages |
| Advancement messages | Chat shows earned advancements | show_advancement_messages | announceAdvancements |
| Locator bar | Shows where other players are on the experience bar | locator_bar | locatorBar |
| Players needed to skip the night | Percentage of online players that must sleep | players_sleeping_percentage | playersSleepingPercentage |
A rule that your version does not know is left off the card, so what you see always works on your server. PvP and Monsters spawn only exist as game rules on newer versions; on older ones they are the PvP and Spawn monsters switches in Settings under Server settings.
Keep inventory with a command
In the Console tab, type the command without a slash. In the game chat, an operator types the same with a slash in front.
gamerule keep_inventory trueThat is for 1.21.11 and newer. On an older server, use the old name:
gamerule keepInventory true
gamerule keep_inventorywithout a value shows the current setting: "Gamerule keep_inventory is currently set to: false".falsein place oftrueswitches a rule off again.- "Incorrect argument for command" almost always means the name belongs to the other version. Try the other column of the table.
- A number rule takes a number:
gamerule players_sleeping_percentage 0.
Keep inventory works in the overworld but not in the Nether
On Paper 26.2 we measured that the Nether and the End keep their own game rules. A plain gamerule from the console only sets the overworld, so a player who dies in the Nether still loses everything.
Set the rule in each dimension with execute in:
execute in minecraft:overworld run gamerule keep_inventory true
execute in minecraft:the_nether run gamerule keep_inventory true
execute in minecraft:the_end run gamerule keep_inventory trueThe Game rules card in the World tab does this for you: every switch you save there goes to all three dimensions.
Game rules for a friendly survival server
Many SMPs change the same few rules before the first players join:
- Keep inventory on, so a death in lava does not cost someone a week of work.
- Mob griefing off, so creepers stop wrecking builds. Villagers then also stop farming and sheep stop eating grass, so decide which matters more.
- Players needed to skip the night at 0, so one sleeping player is enough to make it morning. On a server with a handful of friends, 50 is a fair middle.
- Phantoms off for players who build through the night.
- Locator bar off on a hide and seek or hardcore server, where finding each other should take effort.
For a harder game, go the other way: see make a hardcore Minecraft server. For protection against players rather than mobs, see stop griefing.
Game rules and server settings are different things
Game rules are stored in the world. Difficulty, game mode, hardcore, the whitelist and the view distance are server settings, stored in server.properties and changed in Settings under Server settings. server.properties explained goes through them one by one.
Because game rules belong to the world, a new world starts with the default rules again. After you change your server's seed or reset the world, set them once more.
Questions
Does keep inventory also keep experience?
Yes. With keep inventory on, players keep both their items and their experience levels when they die.
Do game rules stay after a restart?
Yes. They are saved in the world, so a restart or a stop keeps them. Only a new world starts from the defaults.
Can I turn on keep inventory for one player only?
Not with the game rule: it counts for everybody in that dimension. A plugin on Paper or Purpur can give keep inventory to some players or groups only.
Why is the Game rules card empty?
The server is not running. Start it, then click Show game rules. The proxy of a server network has no game rules at all, because a proxy has no world; set them on the servers behind it.
Checked against the Game rules card in the World tab and the console of our control panel on Paper 26.2, September 2026. Written by the Cheapest Minecraft Hosting team, updated .