How to detect when a player is dead
I have an item that is used by the player when they hold right click on a white dye. As they hold right click, a scoreboard timer goes up and once it hits a number it will consume the item and grant effects to the player. However, due to a Minecraft bug, when KeepInventory is turned on the player will keep eating the food after they die. This leads to the item being consumed when the player is dead.
I believe I could circumvent this bug by simply returning the use function if the player is dead, but I do not know how to detect if the player is dead.
Continue to help post