13
0
geforkt von Mirrors/Paper

Fixed entity damaged by entity event firing twice when players damage each other. Thanks Xolsom!

Dieser Commit ist enthalten in:
EvilSeph 2011-06-07 00:57:36 -04:00
Ursprung 8b3f90f232
Commit ef9295707a

Datei anzeigen

@ -516,8 +516,8 @@ public abstract class EntityHuman extends EntityLiving {
++i; ++i;
} }
// CraftBukkit start // CraftBukkit start - Don't call the event when the entity is human since it will be called with damageEntity
if (entity instanceof EntityLiving) { if (entity instanceof EntityLiving && !(entity instanceof EntityHuman)) {
CraftServer server = ((WorldServer) this.world).getServer(); CraftServer server = ((WorldServer) this.world).getServer();
org.bukkit.entity.Entity damager = this.getBukkitEntity(); org.bukkit.entity.Entity damager = this.getBukkitEntity();
org.bukkit.entity.Entity damagee = (entity == null) ? null : entity.getBukkitEntity(); org.bukkit.entity.Entity damagee = (entity == null) ? null : entity.getBukkitEntity();