When a player dies of starvation it happens that chat message "You died"
appears again and again if the player doesn't press Respawn button.
With this edit the damage dealing function checks if the player has life available ( hp > 0)
before dealing damage, leading to not execute the function again and again after the player is dead.
It should solve problems with mods that prints death messages and drops inventory.
When a player dies of starvation it happens that chat message "You died" appears again and again if the player doesn't press Respawn button.
With this edit the damage dealing function checks if the player has life available ( hp > 0) before dealing damage, leading to not execute the function again and again after the player is dead.
It should solve problems with mods that prints death messages and drops inventory.