Bukkit/CraftBukkit — pull request #557 by Evenprime (2011-11-28 16:11:42+00:00)
Title: Fixed dead players being able to interact with their environment

Fix for https://bukkit.atlassian.net/browse/BUKKIT-95

Player deaths aren't handled correctly in MC 1.0.0 versions, because only on their very first death on the server they'll be correctly marked as dead. Without getting marked as dead, players are able (with a simple modification to their client) to walk around and interact with their environment while being invulnerable (they already have only 0 live left).

This patch is the minimalistic way of combining the intended behaviour of MC 1.0.0 (the if-statement body gets executed only once), while ensuring that it is true at least once, independent of the "deathTicks" variable and therefore the entity gets definitely marked as "dead".

Tested with latest CraftBukkit 1529 version and a selfwritten "hack" client that simply ignores health updates of the server, therefore the player can't die clientside. Without the patch I'm able to walk around and break blocks after dying. With the patch I get the intended behaviour of being blocked from doing anything.

I really hope to see that in the first MC 1.0.0 RC of CraftBukkit, as this is a serious problem.