To turn on Minecraft server keep inventory, open the server console and type gamerule keep_inventory true on Minecraft 1.21.11 or newer (that includes every 26.x release), or gamerule keepInventory true on 1.21.10 and older. The change applies as soon as the command runs: from then on, players keep their items and experience when they die.
That is the whole fix for most servers. The rest of this guide covers the details that trip people up: the rule was renamed in late 2025, Paper keeps a separate value for each world, Bedrock spells it differently, and some groups want keep inventory for a few players only. If you are not an operator yet, start with how to OP yourself on a Minecraft server, because /gamerule needs permission level 2 in Java.
How to turn on Minecraft server keep inventory
- Open your server console. On a hosted server that is the Console tab of the panel; on your own PC it is the window where the server is running.
- Check your Minecraft version. The startup log prints it, and it decides which rule name you type (see the table below).
- Type the command without a slash in the console, or with a slash in the in-game chat if you are an operator.
- Query the rule to confirm it: type the rule name with no value, for example
gamerule keep_inventory, and the server answers with the current value. - Test it: die once in survival and check that your hotbar and level are still there after you respawn.
gamerule keep_inventory truegamerule keepInventory trueTo switch it off again, run the same command with false. The default value is false in both Java and Bedrock, so a fresh world always drops items on death until you change it.
keepInventory vs keep_inventory: which name your version uses
In snapshot 25w44a, which became Java Edition 1.21.11, Mojang moved every game rule into a registry and renamed them from camelCase to snake_case resource locations. The official changelog lists the change, and the Minecraft Wiki page for /gamerule now uses gamerule keep_inventory true as its example. Arguments are case sensitive in Java, so KeepInventory or keepinventory will not work on a Java server either.
| Edition and version | Rule name | Command |
|---|---|---|
| Java 1.21.11 and newer (26.x) | keep_inventory (full ID minecraft:keep_inventory) | gamerule keep_inventory true |
| Java 1.21.10 and older | keepInventory | gamerule keepInventory true |
| Bedrock | keepinventory (not case sensitive) | gamerule keepinventory true |
The same rename hit other rules you might use next to it: doDaylightCycle is now advance_time, doMobSpawning is spawn_mobs and mobGriefing is mob_griefing. If an old tutorial gives you a command that the console rejects, the name change is the first thing to check.
What keep inventory saves (and what it does not)
The game rule page on the Minecraft Wiki describes it as "whether the player should keep items and experience in their inventory after death". In practice:
| After death with keep inventory on | Result |
|---|---|
| Items in inventory, hotbar, armor and offhand | Kept |
| Experience levels | Kept |
| Items with Curse of Vanishing | Kept (they do not vanish) |
| Health and hunger | Reset as usual |
| Status effects | Removed as usual |
| Items inside a chest or shulker box placed in the world | Not affected: blocks stay where they are |
Keep inventory does not protect your base or chests from other players. If griefing is the real worry, a land claim plugin does that job, as we explain in our guide to a safe Minecraft server for kids.
Keep inventory in the Nether and the End
On a vanilla server, one value covers the whole server. Paper is different: its source code applies /gamerule to the world of whoever runs the command, which the project calls per-world game rules. When you type the command in the console, it lands on the main overworld only, so a player can still lose everything in the Nether.
The fix is to run the rule once per dimension. From the console, execute in sets the dimension for you:
gamerule keep_inventory true
execute in minecraft:the_nether run gamerule keep_inventory true
execute in minecraft:the_end run gamerule keep_inventory trueIf you created extra worlds with a multiworld plugin, the simplest route is to stand in each world and run /gamerule keep_inventory true from the chat. Run the query again in each one to be sure. On vanilla, the extra two lines are harmless.
Keep inventory for some players only (permission plugins)
The game rule is all or nothing. If you want staff or VIP ranks to keep items while everyone else drops them, leave the rule on false and give a permission with plugins. EssentialsX includes two nodes for this in its plugin.yml, both off by default:
| Permission | What it does |
|---|---|
essentials.keepinv | The player keeps their inventory on death. |
essentials.keepxp | The player keeps their experience instead of dropping it. |
To hand out those nodes you need a permissions plugin such as LuckPerms. Its permission set command takes an optional context at the end, so you can limit the perk to one world:
lp group vip permission set essentials.keepinv true
lp group vip permission set essentials.keepxp true
lp group default permission set essentials.keepinv true world=survivalThe last line gives keep inventory to everyone in a world called survival and nowhere else. Change the group and world names to match your server. Before you install anything, check that the plugin page lists your Minecraft version: at the time of writing, EssentialsX listed builds up to 26.1.2 on Modrinth, while LuckPerms already listed 26.3. Our guide on installing plugins on a Paper server walks through the process.
Keep inventory on a Bedrock server
Bedrock uses keepinventory in one word, and it does not care about capitals. Type gamerule keepinventory true in the Bedrock server console. Bedrock lists this rule under cheats, so a player who wants to run it in game needs to be an operator and the server needs allow-cheats=true in server.properties (the default is false).
Keep inventory not working? Five common causes
| Symptom | Likely cause | Fix |
|---|---|---|
| "Incorrect argument" or unknown rule | Old name on a new version, or the reverse | Use keep_inventory on 1.21.11+ and keepInventory before that |
| Works in the overworld, not in the Nether | Paper stores the rule per world | Run it with execute in for each dimension |
| "Unknown or incomplete command" in chat | You are not an operator or your level is below 2 | Run it from the console or give yourself OP |
| Items still disappear on death | A plugin handles deaths (graves, minigames) | Check that plugin's config for its own death or inventory options |
| Rule resets after changing worlds | You edited a different world than the one you play in | Query the rule in each world |
Set it up in two minutes with TheGameHosting
Everything above works on any server, but a hosted one removes the busywork. On a TheGameHosting Minecraft server you type the command in the Console tab of the panel, from any browser, while the server keeps running 24/7 without your PC on. The Version Changer shows which version and platform you run (Paper, Purpur, Fabric, Vanilla and more), so you know straight away whether to use keep_inventory or keepInventory, and the Plugin Installer adds EssentialsX or LuckPerms without hunting for files. If something goes wrong, Backups let you roll back the world.
The hardware is built for Minecraft: AMD Ryzen 9950X and 7950X3D CPUs up to 5.7 GHz, DDR5 RAM, Samsung NVMe drives and DDoS protection included, in Dallas or Amsterdam. If you are tired of losing a full inventory to lava, pick a plan on our game server plans and pricing page, starting at $1.90 a month for 2 GB, and use code FULL2026 for 15% off for life. Your server is ready about 60 seconds after payment, and you can flip keep inventory on before your friends log in.
FAQ
How do I make my Minecraft server keep inventory?
Open the server console and type gamerule keep_inventory true on 1.21.11 or newer, or gamerule keepInventory true on older versions. In the chat, add a slash at the start. You need permission level 2 or the console.
Why does /gamerule keepInventory not work anymore?
Since Java 1.21.11 (snapshot 25w44a) game rules use snake_case names, so the rule is now keep_inventory. Java commands are also case sensitive, so the capitals must match exactly.
Does keep inventory keep XP too?
Yes. With the rule on, players keep both their items and their experience levels. Health and hunger reset and status effects are removed as usual.
Do I need to restart the server after changing it?
No. The game rule changes as soon as the command runs. Query it by typing the rule name with no value to confirm the new value.
Is keep inventory per world?
On vanilla one value covers the server. On Paper, the command applies to the world of whoever runs it, so set it in the Nether and the End too, for example with execute in minecraft:the_nether run gamerule keep_inventory true.
Hosting for these games
Minecraft Java hostingPaper, Purpur, Fabric, Forge
Minecraft Bedrock hostingPhone, console and Windows players
Written by TheGameHosting Team, the people who run our servers in Dallas and Amsterdam and answer your tickets.
All posts
TheGameHosting Team