Help centre

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

  1. Start the server. Game rules live in the running world, so the card needs the server online.
  2. Open the World tab and find the Game rules card.
  3. Click Show game rules. The panel reads the current value of each rule.
  4. Switch on Keep inventory.
  5. 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 panelWhat it doesName since 1.21.11Older name
Keep inventoryPlayers keep items and experience when they diekeep_inventorykeepInventory
Mob griefingCreepers break blocks, endermen pick them up, villagers farmmob_griefingmobGriefing
PvPPlayers can damage each otherpvpnone, use the PvP setting
Day and night cycleTime moves on; off freezes the time of dayadvance_timedoDaylightCycle
Weather changesRain and storms come and go; off keeps the current weatheradvance_weatherdoWeatherCycle
Mobs spawnAnimals and monsters spawn by themselvesspawn_mobsdoMobSpawning
Monsters spawnHostile mobs spawn; animals are not affectedspawn_monstersnone, use Spawn monsters
PhantomsPhantoms attack players who have not sleptspawn_phantomsdoInsomnia
Pillager patrolsGroups of pillagers roam the worldspawn_patrolsdoPatrolSpawning
TNT explodesLit TNT blows up; off makes it harmlesstnt_explodestntExplodes
Fall damagePlayers take damage from fallingfall_damagefallDamage
Natural regenerationHealth comes back when players are well fednatural_health_regenerationnaturalRegeneration
Instant respawnSkip the death screenimmediate_respawndoImmediateRespawn
Death messagesChat shows how a player diedshow_death_messagesshowDeathMessages
Advancement messagesChat shows earned advancementsshow_advancement_messagesannounceAdvancements
Locator barShows where other players are on the experience barlocator_barlocatorBar
Players needed to skip the nightPercentage of online players that must sleepplayers_sleeping_percentageplayersSleepingPercentage

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 true

That is for 1.21.11 and newer. On an older server, use the old name:

gamerule keepInventory true
The Console tab with a command in the command field, the Send button and the Quick commands list
Type the game rule in the command field and press Send. The console answers with the new value.
  • gamerule keep_inventory without a value shows the current setting: "Gamerule keep_inventory is currently set to: false".
  • false in place of true switches 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 true

The 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 .