mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-11 09:23:42 +01:00
Fixed drowning damage event.
This commit is contained in:
parent
d92376e106
commit
d0cd8c6cc7
1 changed files with 13 additions and 1 deletions
|
@ -167,7 +167,19 @@ public abstract class EntityLiving extends Entity {
|
|||
this.l.a("bubble", p + (double) f1, q + (double) f2, r + (double) f3, this.s, t, u);
|
||||
}
|
||||
|
||||
a(((Entity) (null)), 2);
|
||||
// CraftBukkit start
|
||||
CraftServer server = ((WorldServer) l).getServer();
|
||||
org.bukkit.entity.Entity damagee = this.getBukkitEntity();
|
||||
DamageCause damageType = EntityDamageEvent.DamageCause.DROWNING;
|
||||
int damageDone = 2;
|
||||
|
||||
EntityDamageEvent ede = new EntityDamageEvent(damagee, damageType, damageDone);
|
||||
server.getPluginManager().callEvent(ede);
|
||||
|
||||
if (!ede.isCancelled()){
|
||||
a(((Entity) (null)), ede.getDamage());
|
||||
}
|
||||
// CraftBukkit end
|
||||
}
|
||||
Z = 0;
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue