Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
Don't apply fall damage when cancelled. Fixes BUKKIT-4065
Dieser Commit ist enthalten in:
Ursprung
8590492680
Commit
c3cf8a435b
@ -957,11 +957,13 @@ public abstract class EntityLiving extends Entity {
|
|||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
EntityDamageEvent event = CraftEventFactory.callEntityDamageEvent(null, this, EntityDamageEvent.DamageCause.FALL, i);
|
EntityDamageEvent event = CraftEventFactory.callEntityDamageEvent(null, this, EntityDamageEvent.DamageCause.FALL, i);
|
||||||
if (!event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
i = event.getDamage();
|
return;
|
||||||
if (i > 0) {
|
}
|
||||||
this.getBukkitEntity().setLastDamageCause(event);
|
|
||||||
}
|
i = event.getDamage();
|
||||||
|
if (i > 0) {
|
||||||
|
this.getBukkitEntity().setLastDamageCause(event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren