3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-19 04:50:06 +01:00

Fixed drowning damage event.

Dieser Commit ist enthalten in:
sk89q 2011-01-30 01:26:45 -08:00
Ursprung d92376e106
Commit d0cd8c6cc7

Datei anzeigen

@ -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 {