Archiviert
13
0

Fixed ender pearls ignoring damage cancellation

Dieser Commit ist enthalten in:
Nathan Adams 2011-12-02 00:06:27 +00:00
Ursprung 0c958c0dff
Commit 9fe5529791

Datei anzeigen

@ -42,8 +42,11 @@ public class EntityEnderPearl extends EntityProjectile {
this.shooter.fallDistance = 0.0F; this.shooter.fallDistance = 0.0F;
EntityDamageEvent event = new EntityDamageEvent(getBukkitEntity(), EntityDamageEvent.DamageCause.FALL, 5); EntityDamageEvent event = new EntityDamageEvent(getBukkitEntity(), EntityDamageEvent.DamageCause.FALL, 5);
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
if (!event.isCancelled()) {
this.shooter.damageEntity(DamageSource.FALL, event.getDamage()); this.shooter.damageEntity(DamageSource.FALL, event.getDamage());
} }
}
// CraftBukkit end // CraftBukkit end
this.die(); this.die();