# /gamerule keepInventory true This is a world-specific command so you will have to repeat them again once you enter other worlds.