---
title: "How to Turn On Keep Inventory in Minecraft (Java, Bedrock and Servers)"
description: "The keep inventory command for Java and Bedrock, turning it on in singleplayer, Realms and on a server console, what it keeps, and the Paper Nether catch."
url: "https://www.gameserverkings.com/knowledge-base/minecraft/how-to-turn-on-keep-inventory/"
category: "Minecraft"
category_url: "https://www.gameserverkings.com/knowledge-base/minecraft/"
published: "2026-11-28T20:16:43.544Z"
updated: "2026-11-28T23:49:03.573Z"
source_format: "markdown"
site: "GameServerKings"
---

# How to Turn On Keep Inventory in Minecraft (Java, Bedrock and Servers)

To turn on keep inventory in Minecraft, run `/gamerule keep_inventory true` on Java Edition or `/gamerule keepinventory true` on Bedrock Edition. From then on, every player in that world keeps their items and their experience when they die. The change is instant, needs no restart, and survives restarts because game rules are saved inside the world itself.

That one line is the whole answer if commands already work where you are playing. Usually the real question is why they don't: commands are off in this singleplayer world, you're on a Realm, the command says "Incorrect argument for command", or you're on a server and nobody has told you where the console is. This guide covers each of those, what keep inventory does and doesn't keep, and the server-side catch where the rule is on in the Overworld but you still lose everything in the Nether.

> [!NOTE] Versions and date checked
> Checked against minecraft.wiki on **28 November 2026**, for the current releases: **Java Edition 26.3** and **Bedrock Edition 26.66**. The Java rule name changed in 1.21.11, and both spellings are given below.

## The Command for Each Edition

| Where | Command | Notes |
|---|---|---|
| Java 1.21.11 and later (including 26.x) | `/gamerule keep_inventory true` | Snake case. This is the current name |
| Java 1.21.10 and earlier | `/gamerule keepInventory true` | The old camelCase name. Current versions reject it |
| Bedrock Edition | `/gamerule keepinventory true` | All lowercase. Needs cheats on in that world |
| A server console (Java) | `gamerule keep_inventory true` | No slash in the console |

To turn it back off, run the same command with `false`. To check the current value, leave the value off: `/gamerule keep_inventory` prints whether it is `true` or `false`, which is the quickest way to confirm a change really took.

> [!IMPORTANT] "Incorrect argument for command" usually means the wrong spelling for your version
> Java Edition 1.21.11 moved every game rule into a registry and renamed them from camelCase to snake_case, so `keepInventory` became `keep_inventory`. Most videos and older guides still show the old name. Bedrock never had either spelling and uses `keepinventory`. The full list of renames, including the ones that were not straight case changes, is in [Minecraft Server Commands](/knowledge-base/minecraft/admin-commands/).

## Java Singleplayer: When Commands Are Off

`/gamerule` is a cheat command, so it only works if commands are allowed in that world. You have three routes, depending on how the world was created.

1. **You enabled Allow Commands when you made the world.** Type the command in chat. Nothing else is needed.
2. **You didn't, and you're on 26.2 or later.** Press Esc and open **World Options**. Since Java Edition 26.2, the host of a world can use the **Allow Commands** button there, in the world you're already in. Turn it on and the command works.
3. **You'd rather not type commands.** Java has an **Edit Game Rules** screen with a toggle for every rule, keep inventory included. It's on the **Create New World** screen, where it doesn't need commands. Since 26.1 it's also in **World Options** in the pause menu, but there the button only works while Allow Commands is on.

> [!WARNING] Hardcore worlds have no switch for this
> In a Hardcore world, World Options greys out **Edit Game Rules**, and **Allow Commands** too if you started without commands. There's no switch for either afterwards.

Older guides tell you to Open to LAN to get commands for yourself. That stopped working in 26.2, when the LAN screen's Allow Commands button became a setting for the other players that no longer affects the host. [How to Teleport in Minecraft](/knowledge-base/minecraft/how-to-teleport/) covers that change in more detail.

## Bedrock Worlds and Realms

On Bedrock, keep inventory is a toggle in the world settings, in the **Cheats** section of the world menu, next to the other cheats-only game rules. You can also type `/gamerule keepinventory true` once cheats are on.

The catch is achievements. Turning cheats on in a Bedrock world **permanently** stops anyone from earning achievements in that world, even if you turn cheats off again later. If achievements matter to you, decide before you flip the switch, or make the change in a copy of the world.

**Realms.** On a Java Realm the owner is an operator, so the owner can run `/gamerule keep_inventory true` in chat like on any server. On a Bedrock Realm, the owner or an operator edits the world settings, and most of them can be changed from the game menu while you're playing on the Realm. Keep inventory sits in the same Cheats section, with the same achievements cost.

## On a Server: The Console Route

On a multiplayer server the command needs **permission level 2** if you type it in chat. Level 2 also hands out `/gamemode` and `/give`, so don't op friends just so they can run it. [Minecraft Op Permission Levels](/knowledge-base/minecraft/op-permission-levels/) explains what each level gives.

The console doesn't have that problem. It always runs at full permission. On a [GameServerKings Minecraft server](/games/minecraft/), open the **Console** tab in the panel and type:

```text title="Console (Java server)"
gamerule keep_inventory true
```

No slash, no restart, and nothing to edit in `server.properties`. There isn't a keep-inventory key in that file, so adding one does nothing. The server reads the file, ignores the unknown line, and the game rule stays as it was. Game rules belong to the world save, which is why the setting survives restarts and why it comes with the world if you move it to another server.

**Bedrock Dedicated Server.** The server ships with `allow-cheats=false`, which blocks cheat commands typed in chat, even by an operator. The console isn't affected: we ran this on a Bedrock Dedicated Server 1.26.66.1 with the default `allow-cheats=false` and the rule changed. Run it in the Console:

```text title="Console (Bedrock server)"
gamerule keepinventory true
```

Set `allow-cheats=true` only if you want operators to use commands in game. [Bedrock server.properties](/knowledge-base/minecraft/bedrock-server-properties/) has the details.

### The Nether and End catch on Paper servers

On vanilla Java, one game rule covers the Overworld, the Nether and the End. Paper treats the three dimensions as separate worlds, each with its own set of game rules. A `gamerule` typed in the console only changes the main world. The usual symptom is a report that keep inventory "works in the Overworld but I lost everything in the Nether".

Don't guess. Check from inside each dimension. Stand in the Nether, run `/gamerule keep_inventory` with no value, and see what it prints. If it says `false`, set it there too and do the same in the End. From the console, `execute in minecraft:the_nether run gamerule keep_inventory true` does it without going there. If you run [Multiverse](/knowledge-base/minecraft/multiverse-multiple-worlds/), you can set the rule on any world without going there:

```text title="Multiverse, per world"
/mv gamerule set keep_inventory true world_nether
/mv gamerule set keep_inventory true world_the_end
```

Use `/mv list` first to see the exact world names your server uses.

## What Keep Inventory Keeps, and What It Doesn't

| On death, with keep inventory on | |
|---|---|
| Inventory, hotbar, armour and offhand | Kept |
| Experience levels | Kept |
| Items with **Curse of Vanishing** | Kept. The curse only deletes items that drop, and nothing drops |
| Health and hunger | Reset, as on any respawn |
| Status effects | Removed |
| Your respawn point | Unchanged. You still go back to your bed, anchor or the world spawn |

The Curse of Vanishing row surprises people. The game treats it as intended behaviour, and it means keep inventory is the one setting in the game that cancels the curse completely. [Minecraft Curse of Vanishing, Explained](/knowledge-base/minecraft/curse-of-vanishing/) covers what that does to a PvP economy.

Keep inventory is also all-or-nothing. It applies to every player in the world, with no per-player or per-group option in vanilla. If you want something in between, that takes a plugin. Graves plugins, or EssentialsX's `/back` with `essentials.back.ondeath` granted so players can get back to where they died, are the usual middle ground. [EssentialsX Setup](/knowledge-base/minecraft/essentialsx-setup/) covers that permission, which is off by default.

## Should a Server Turn It On?

It's a real gameplay decision rather than a quality-of-life tweak, so make it on purpose and tell the players.

- **Friends' SMP with no PvP:** usually yes. Losing a full kit to lag or a creeper mostly makes people stop playing. Settle it as a group before the world starts. [How to Make a Minecraft SMP Server for Friends](/knowledge-base/minecraft/start-an-smp-server/) covers the other settings worth agreeing on.
- **PvP or a player economy:** usually no. With keep inventory on, a kill costs the loser nothing, gear never leaves the economy, and Curse of Vanishing stops mattering.
- **Hard or hardcore-style servers:** no. Losing items is the stakes.

If a player has already lost a kit before you turned the rule on, you can't undo it with a game rule. You restore their player data file from a backup taken before the death. [Editing Minecraft Player Data](/knowledge-base/minecraft/editing-player-data-nbt/) shows how to do that safely without rolling back the whole world.

## Troubleshooting

- **"Incorrect argument for command" or "Invalid boolean".** Check the spelling for your version (`keep_inventory` on 1.21.11 and later, `keepInventory` before) and make sure you typed `true` and not `on`.
- **"Unknown or incomplete command".** You aren't at level 2 on that server, or commands are off in that world. On a server, run it from the Console instead, or see [Minecraft Op Permission Levels](/knowledge-base/minecraft/op-permission-levels/).
- **It's refused in chat on Bedrock.** Cheats are off in that world, or `allow-cheats` is `false` on a dedicated server. On a server, use the Console.
- **It works in one dimension and not another.** On Paper, see the Nether and End section above.
- **It switched itself off.** Usually the world was replaced: a reset, a new `level-name`, or an uploaded save that carries its own game rules. Run `/gamerule keep_inventory` to read the value, and set it again on the new world.

## FAQ

### What is the keep inventory command in Minecraft?

`/gamerule keep_inventory true` on Java Edition 1.21.11 and later, `/gamerule keepInventory true` on older Java versions, and `/gamerule keepinventory true` on Bedrock.

### Does keep inventory keep XP?

Yes. Players keep their items and their experience levels. Health and hunger reset, and status effects are removed.

### Do I need to restart the server after turning on keep inventory?

No. Game rules take effect immediately and are saved with the world, so they also survive restarts.

### Can I turn on keep inventory for just one player?

Not in vanilla. The game rule applies to everyone in the world. Per-player or per-rank behaviour needs a plugin.

### Does turning on keep inventory disable achievements?

On Bedrock, yes. Keep inventory needs cheats, and turning cheats on stops achievements in that world for good. Java advancements aren't blocked by commands.

## What to Read Next

- [Minecraft Server Commands: The Complete Op, Admin and Console List](/knowledge-base/minecraft/admin-commands/): every other game rule worth knowing, and the full 1.21.11 rename list
- [Minecraft Curse of Vanishing, Explained](/knowledge-base/minecraft/curse-of-vanishing/): what keep inventory does to cursed items
- [Minecraft Op Permission Levels: 0 to 4 Explained](/knowledge-base/minecraft/op-permission-levels/): why level 2 is more than a game rule permission
- [How to Make a Minecraft SMP Server for Friends](/knowledge-base/minecraft/start-an-smp-server/): the settings a friends' server should decide on day one
- [Editing Minecraft Player Data](/knowledge-base/minecraft/editing-player-data-nbt/): restoring one player's inventory from a backup
- [How to Change Tick Speed in Minecraft](/knowledge-base/minecraft/how-to-change-tick-speed/): the other game rule everyone looks up
- [How to Turn On Coordinates in Minecraft](/knowledge-base/minecraft/how-to-turn-on-coordinates/): so a death is a trip back, not a search
- [Multiverse: Running Several Worlds on One Minecraft Server](/knowledge-base/minecraft/multiverse-multiple-worlds/): per-world game rules on a multi-world server

---

Made with 💜 by GameServerKings
