Don't set health directly, will interfere with scoreboard system.

This commit is contained in:
Travis Watkins 2013-03-16 08:57:57 -05:00
parent 7466321212
commit 5903b9f5ca

View File

@ -642,12 +642,12 @@ public abstract class EntityLiving extends Entity {
this.world.getServer().getPluginManager().callEvent(event);
if (!event.isCancelled()) {
this.health += event.getAmount();
this.setHealth(this.getHealth() + event.getAmount());
}
// this.getMaxHealth() -> this.maxHealth
if (this.health > this.maxHealth) {
this.health = this.maxHealth;
this.setHealth(this.maxHealth);
// CraftBukkit end
}