mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-29 19:51:30 +01:00
Fixed entity damaged by entity event firing twice when players damage each other. Thanks Xolsom!
This commit is contained in:
parent
8b3f90f232
commit
ef9295707a
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user