From ef9295707aaf3abde7cb44c51ebf67b272f202d2 Mon Sep 17 00:00:00 2001 From: EvilSeph Date: Tue, 7 Jun 2011 00:57:36 -0400 Subject: [PATCH] Fixed entity damaged by entity event firing twice when players damage each other. Thanks Xolsom! --- src/main/java/net/minecraft/server/EntityHuman.java | 4 ++-- 1 file 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 57727cab6d..713b973e51 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();