summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorTravis Watkins <amaranth@ubuntu.com>2013-03-16 08:57:57 -0500
committerTravis Watkins <amaranth@ubuntu.com>2013-03-16 08:57:57 -0500
commit5903b9f5caeacf757f13840f3064f4115dbe378c (patch)
tree21f07dd90effbde7d522c8673d59f67fa0bfe3bb /src/main
parent746632121287385aaac51cb4c44eae1bb7f03113 (diff)
downloadcraftbukkit-5903b9f5caeacf757f13840f3064f4115dbe378c.tar
craftbukkit-5903b9f5caeacf757f13840f3064f4115dbe378c.tar.gz
craftbukkit-5903b9f5caeacf757f13840f3064f4115dbe378c.tar.lz
craftbukkit-5903b9f5caeacf757f13840f3064f4115dbe378c.tar.xz
craftbukkit-5903b9f5caeacf757f13840f3064f4115dbe378c.zip
Don't set health directly, will interfere with scoreboard system.
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/net/minecraft/server/EntityLiving.java4
1 files changed, 2 insertions, 2 deletions
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
}