If a plugin cancels the EntityResurrectEvent, the player will keep the inventory even thought the world has the keepInventory game rule disabled. The experience is also lost and no experience orb is spawned, so they are completely gone.
I've attached a test plugin which gives you a totem, random items, experience level and kills you naturally, everything without any permission check or requirement.
It affects both Spigot and CraftBukkit.
- Create a server with the default settings and having only with the provided test plugin
- Use the /totem command to get a totem and some random items
- Use the /level command to get 50 levels
- Use the /killme command to die, make sure to have the totem in your hands
Your death should be the same with or without the totem in your hands, so:
- You should die
- All your items should drop with velocity
- Some experience orbs should be spawned, I don't know the exact math behind this.
- You should see an empty hotbar before you click on respawn
- You should see the level that you had before your death
- Your inventory should be empty when you respawn
- You should not have zero experience when you respawn
The death while holding a totem of undying differs from normal deaths because:
- No item is dropped
- No experience orb is spawned
- You see the items that you had before your death in your hotbar
- All inventory items is kept on respawn