☀️ 50% off your first month:SUMMER26
MinecraftMinecraft·Configuration

How to Enable Keep Inventory in Minecraft (Never Lose Items Again)

Enable keep inventory on your Minecraft server: minecraft:keep_inventory on 1.21.11 and newer, keepInventory on older builds, plus every dimension on Paper.

Andreas·
4 min read
·
Mar 19, 2024
·
Last updated: Jul 28, 2026
Table of Contents

How to Enable Keep Inventory in Minecraft

Keep Inventory stops players from dropping their items, armor and XP when they die. It is a single command, but Mojang renamed it in Java Edition 1.21.11, so the exact text depends on which version your server runs.

On Java Edition 1.21.11 and newer:

/gamerule minecraft:keep_inventory true

On Java Edition 1.21.10 and older:

/gamerule keepInventory true

You need operator (OP) rights to run it in chat. From the server console, the Console tab in your DoomHosting panel, you always count as operator and the leading slash is optional. Swap true for false to turn Keep Inventory off again.

The Gamerule Was Renamed in 1.21.11

In snapshot 25w44a, on the way to Java Edition 1.21.11 (December 2025), every gamerule was moved into a registry and renamed from camelCase to a snake_case resource location. keepInventory became minecraft:keep_inventory. Nothing about how the rule behaves changed, only what you type.

The minecraft: namespace is the default, so /gamerule keep_inventory true does exactly the same thing on 1.21.11 and newer. The old camelCase names may still resolve on some builds for backwards compatibility, but they are on their way out: once you are on 1.21.11 or newer, use the new name.

Not sure which side of the change your server is on? Type /gamerule in chat and let tab completion list the names your server actually accepts. The version is also printed in the first lines of the server console at startup, and /version works in chat on Paper and Spigot. Our blog post How to Keep Inventory in Minecraft 2026 goes deeper on the new command and lists the renames for the other gamerules.

Enable It in Every Dimension (Paper and Spigot)

Most Minecraft servers here run Paper or Spigot, and that changes where gamerules are stored. Bukkit-derived server software keeps the Overworld, the Nether and The End as three separate worlds, each with its own copy of every gamerule. /gamerule only writes to the dimension you are standing in, which is why people enable Keep Inventory in the Overworld and then lose everything on their first trip through a Nether portal. On unmodified vanilla Java the rule is world-wide and one command covers the lot, so this is Paper and Spigot behaviour rather than something the game itself does.

You do not have to travel to each dimension to fix it. Run all three from wherever you are:

/execute in minecraft:overworld run gamerule minecraft:keep_inventory true
/execute in minecraft:the_nether run gamerule minecraft:keep_inventory true
/execute in minecraft:the_end run gamerule minecraft:keep_inventory true

On 1.21.10 and older, keep the old rule name:

/execute in minecraft:overworld run gamerule keepInventory true
/execute in minecraft:the_nether run gamerule keepInventory true
/execute in minecraft:the_end run gamerule keepInventory true

The dimension IDs were not part of the rename, so minecraft:the_nether and minecraft:the_end are correct on both versions. Extra worlds added by a plugin such as Multiverse are separate worlds too, so each one needs its own run.

Check Whether Keep Inventory Is On

Run the command without a value and the server replies with the current setting:

/gamerule minecraft:keep_inventory

On 1.21.10 and older, use /gamerule keepInventory. The answer should be true. On Paper and Spigot that answer only describes the dimension you are standing in, so read the other two without moving:

/execute in minecraft:the_nether run gamerule minecraft:keep_inventory
/execute in minecraft:the_end run gamerule minecraft:keep_inventory

Common Issues and Solutions

  • "Unknown or incomplete command" on 1.21.11 or newer: you typed the old name. Use minecraft:keep_inventory.
  • The same error on 1.21.10 or older: you typed the new name. Use keepInventory.
  • The command is rejected on an older version and the spelling looks right: the old name is case-sensitive, and keepinventory is not keepInventory.
  • "You do not have permission to use this command": you are not OP. Run op <username> from the server console, then try again in chat.
  • It works in the Overworld but not in the Nether or The End: that is the per-dimension behaviour above. Run the /execute in commands for all three.
  • The setting is gone after a restart: gamerules are stored in the world save, so a world that never saved cannot keep them. Always stop the server from the panel instead of killing it, and check whether a plugin or datapack resets gamerules on startup.
  • Players still drop items with the rule set to true: a death, grave or hardcore plugin is handling drops itself. Check its config before changing the gamerule again.

Need a hand with your server settings? Contact our support team and we will take a look.

Minecraft

Start your Minecraft Server

High performance hosting with 24/7 support

Related Articles