diff options
author | EvilSeph <evilseph@unaligned.org> | 2011-06-07 00:57:36 -0400 |
---|---|---|
committer | EvilSeph <evilseph@unaligned.org> | 2011-06-07 00:57:36 -0400 |
commit | ef9295707aaf3abde7cb44c51ebf67b272f202d2 (patch) | |
tree | 2d029436a2c353723d50243d33b9226bf33c181b /src/main/java/net/minecraft/server/EntityHuman.java | |
parent | 8b3f90f232725e94b38859c757400d990b77d45d (diff) | |
download | craftbukkit-ef9295707aaf3abde7cb44c51ebf67b272f202d2.tar craftbukkit-ef9295707aaf3abde7cb44c51ebf67b272f202d2.tar.gz craftbukkit-ef9295707aaf3abde7cb44c51ebf67b272f202d2.tar.lz craftbukkit-ef9295707aaf3abde7cb44c51ebf67b272f202d2.tar.xz craftbukkit-ef9295707aaf3abde7cb44c51ebf67b272f202d2.zip |
Fixed entity damaged by entity event firing twice when players damage each other. Thanks Xolsom!
Diffstat (limited to 'src/main/java/net/minecraft/server/EntityHuman.java')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityHuman.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java index 57727cab..713b973e 100644 --- a/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java @@ -516,8 +516,8 @@ public abstract class EntityHuman extends EntityLiving { ++i; } - // CraftBukkit start - if (entity instanceof EntityLiving) { + // CraftBukkit start - Don't call the event when the entity is human since it will be called with damageEntity + if (entity instanceof EntityLiving && !(entity instanceof EntityHuman)) { CraftServer server = ((WorldServer) this.world).getServer(); org.bukkit.entity.Entity damager = this.getBukkitEntity(); org.bukkit.entity.Entity damagee = (entity == null) ? null : entity.getBukkitEntity(); |