Archiviert
13
0

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;
}
// 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();