Getting started

Keep inventory on death

Stop players from losing items when they die

Edition
Java Edition
Version
Java Edition 1.20.5 - 1.21.4
Difficulty
Beginner
Prep time
1 minutes
Copied
2 times
Permission
Requires cheats to be enabled or operator permission

Follow in order

All commands

1

Enable the rule

/gamerule keepInventory true

Turns on the keepInventory rule for the whole world

Customize before use

Adjust the target selector, amount, or coordinates to match your world before running

Setup steps

Run the commands in order, top to bottom, and check the result after each one

Related presets