Want a server that's ready to go?
Java or Bedrock, vanilla or modded, with one-click mods and plugins, backups and help with any problem.
Keep inventory is a game rule: a setting saved in the world. When it's on, players keep their items and experience when they die.
Turn it on#
In the server console, or in game as an operator:
gamerule keepInventory true
In game, put a / in front. It works straight away, with no restart.
To turn it off again:
gamerule keepInventory false
It's per world#
The rule is stored in the world, so:
- It stays on through restarts.
- A new world starts with it off. Run the command again after starting a new world.
- On Paper, the Nether and End are separate worlds. Keep inventory follows the main world's setting for players in them on most versions, but if you use extra worlds (Multiverse), set it in each.
Other rules people change with it#
gamerule doImmediateRespawn true
gamerule playersSleepingPercentage 50
gamerule mobGriefing false
playersSleepingPercentage 50 lets the night pass when half the players sleep. mobGriefing false stops creepers blowing up builds (it also stops villagers farming).
Questions
Does keep inventory reset when the server restarts?
No. Game rules are saved in the world, so it stays on until you turn it off.
Can I keep inventory in one world but not another?
Yes. Game rules are per world. On Paper, run the command in each world, or use a plugin like Multiverse to set it per world.
Do players keep experience too?
Yes. With keepInventory on, players keep their experience levels as well as their items.