From 5903b9f5caeacf757f13840f3064f4115dbe378c Mon Sep 17 00:00:00 2001 From: Travis Watkins Date: Sat, 16 Mar 2013 08:57:57 -0500 Subject: Don't set health directly, will interfere with scoreboard system. --- src/main/java/net/minecraft/server/EntityLiving.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java index ae180c24..27b2ce24 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java @@ -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 } -- cgit v1.2.3