geforkt von Mirrors/Paper
fixed double firing of EntityDamageByEntityEvent
Dieser Commit ist enthalten in:
Ursprung
5adcf526ab
Commit
066a95769c
@ -17,6 +17,10 @@ public class EntityDamageSourceIndirect extends EntityDamageSource {
|
|||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
String source = (this.n == null) ? "Herobrine" : this.n.ad();
|
String source = (this.n == null) ? "Herobrine" : this.n.ad();
|
||||||
return LocaleI18n.a("death." + this.m, new Object[] { entityhuman.name, source});
|
return LocaleI18n.a("death." + this.m, new Object[] { entityhuman.name, source});
|
||||||
|
}
|
||||||
|
|
||||||
|
public Entity getProximateDamageSource() {
|
||||||
|
return super.getEntity();
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -587,7 +587,9 @@ public abstract class EntityHuman extends EntityLiving {
|
|||||||
// also damage the player in this way. For example, EntitySlime.
|
// also damage the player in this way. For example, EntitySlime.
|
||||||
|
|
||||||
// We handle projectiles in their individual classes!
|
// We handle projectiles in their individual classes!
|
||||||
if (!(entity.getBukkitEntity() instanceof Projectile)) {
|
boolean isProjectile = damagesource instanceof EntityDamageSourceIndirect && ((EntityDamageSourceIndirect) damagesource).getProximateDamageSource().getBukkitEntity() instanceof Projectile;
|
||||||
|
|
||||||
|
if (!isProjectile) {
|
||||||
org.bukkit.entity.Entity damager = ((Entity) entity1).getBukkitEntity();
|
org.bukkit.entity.Entity damager = ((Entity) entity1).getBukkitEntity();
|
||||||
org.bukkit.entity.Entity damagee = this.getBukkitEntity();
|
org.bukkit.entity.Entity damagee = this.getBukkitEntity();
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren