I'm always playing Minecraft PE on my tablet, but I got lost and my plan to get home involves me dying and respawning at home. I have diamonds in my inventory and I don't want to lose them, but the command won't work. Is there another way for me to keep my inventory after I die?
Unfortunately, the two methods, commands and enderchests, don't exist. However, you could craft a compass with iron and redstone, and follow it home. Or you could wait for future updates for them to add one of them.
You don't need to die. Use methods to get home. Some are found in this question.
In summary, these are the methods that are relevant to your case:
- Giant pillar
- Abandonment (Build a new home)
- Make a chest near a landmark, then kill yourself.
- Copy of world (if possible)
by command I'm assuming you mean /gamerule keepInventory True
What I suggest you do is make a chest containing your items, and place it in such a way you will have no problem finding it back, then kill your player