Getting started

Keep inventory on death (Bedrock)

Keep items and XP after death on Bedrock

Edition
Bedrock Edition
Version
Bedrock Edition 26.x (1.20 and up)
Difficulty
Beginner
Prep time
1 minutes
Copied
3 times
Permission
Requires cheats to be enabled or operator permission

When to use it

Use this for a Bedrock world where friends should keep items and experience after death. It is a shared world rule, not a temporary effect granted only to the nearest player.

Before running

Have the world owner or an authorized command user change the setting. Check command access first and tell players that the death rules are changing before the next exploration session.

Follow in order

All commands

1

Enable the rule

/gamerule keepInventory true

Same rule, listed separately to confirm Bedrock compatibility

2

Read the rule back

/gamerule keepInventory

Chat replies with the current value; expect true before the activity starts

What to customize

true enables retention and false disables it. There is no item count or duration argument, and this command cannot apply the rule to just one team.

Verify the result

Query /gamerule keepInventory and confirm true before a risky activity. Use a copy for a behavioral test; dying is not necessary just to read the setting.

When results differ

If access is denied, ask the owner to check the runner’s permissions. If the value returns to false after rejoining, inspect map commands instead of repeatedly forcing the value and hiding the cause.

Related presets