13
0
geforkt von Mirrors/Paper

Report valid health when getting Entity health. Fixes BUKKIT-3210

Dieser Commit ist enthalten in:
feildmaster 2012-12-23 07:16:59 -06:00
Ursprung ed6aab8200
Commit 4e1793f363

Datei anzeigen

@ -59,7 +59,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
} }
public int getHealth() { public int getHealth() {
return getHandle().getHealth(); return Math.min(Math.max(0, getHandle().getHealth()), getMaxHealth());
} }
public void setHealth(int health) { public void setHealth(int health) {