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?
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)