Enable cheats in a world you control, open chat, then enter /gamerule keepinventory true. This keeps players' items on death in that world; it is not a server-wide permission bypass.
Open the Bedrock world where you want to change gameplay rules. On a shared server, only use commands when the owner or administrator has given you the required permission.
2
Check the world before changing it
Confirm that keeping inventory after death is actually the rule you want for this world. Gamerules affect world behaviour, so test them in a copy when the world is important.
3
Open chat
Open Minecraft chat while inside the intended world. Commands must be entered in the world where the gamerule should apply, not in a launcher or server list.
4
Enter the gamerule
Type `/gamerule keepinventory true` and send it. Microsoft documents keepInventory as the rule that controls whether players keep items on death.
5
Verify the command response
Read the command feedback and use `/gamerule` to inspect available rules if the name is rejected. Do not substitute a random command from a third-party list.
6
Test the world rule
After confirming the change, test it in a safe way and check whether the inventory remains after a respawn. Tell other players before changing a shared world's death rules.
Video walkthrough
If it does not work
If the command is denied, stop and ask the world or server owner for the appropriate permission instead of attempting to bypass server controls.
If items still drop after the command, confirm you entered it in the same Bedrock world and that the rule name was accepted before testing again.
ⓘ Sources and verification
Checked against official documentation on . Scope: Platform not recorded.
Follow the linked first-party guidance if labels differ after a platform or app update.