As said, I want to check on player death if a specific item is within the inventory. If so, remove that item and keep the rest of the inventory from dropping.
I know to use the event.entity.player.inventory.contains('item') within the EntityEvents.death and that I can use persistent data to set and cancel the EntityEvents.drops event. However I am not sure how to keep the inventory.
Is there an easier way to do this?