mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-16 12:43:52 -07:00
fixed double firing of EntityDamageByEntityEvent
This commit is contained in:
@@ -587,7 +587,9 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
// also damage the player in this way. For example, EntitySlime.
|
||||
|
||||
// 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 damagee = this.getBukkitEntity();
|
||||
|
||||
|
Reference in New Issue
Block a user