summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorNathan Adams <dinnerbone@dinnerbone.com>2011-12-02 00:06:27 +0000
committerNathan Adams <dinnerbone@dinnerbone.com>2011-12-02 00:06:27 +0000
commit9fe552979160e7f6b0e5210896474c8f0cbc0703 (patch)
tree2c8b5396975e2bea3be10cc040d8f14b45cc7066 /src/main
parent0c958c0dff372398a773c3ebc52f5178bce0f374 (diff)
downloadcraftbukkit-9fe552979160e7f6b0e5210896474c8f0cbc0703.tar
craftbukkit-9fe552979160e7f6b0e5210896474c8f0cbc0703.tar.gz
craftbukkit-9fe552979160e7f6b0e5210896474c8f0cbc0703.tar.lz
craftbukkit-9fe552979160e7f6b0e5210896474c8f0cbc0703.tar.xz
craftbukkit-9fe552979160e7f6b0e5210896474c8f0cbc0703.zip
Fixed ender pearls ignoring damage cancellation
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/net/minecraft/server/EntityEnderPearl.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/EntityEnderPearl.java b/src/main/java/net/minecraft/server/EntityEnderPearl.java
index 02e0327e..5469b6e2 100644
--- a/src/main/java/net/minecraft/server/EntityEnderPearl.java
+++ b/src/main/java/net/minecraft/server/EntityEnderPearl.java
@@ -42,7 +42,10 @@ public class EntityEnderPearl extends EntityProjectile {
this.shooter.fallDistance = 0.0F;
EntityDamageEvent event = new EntityDamageEvent(getBukkitEntity(), EntityDamageEvent.DamageCause.FALL, 5);
Bukkit.getPluginManager().callEvent(event);
- this.shooter.damageEntity(DamageSource.FALL, event.getDamage());
+
+ if (!event.isCancelled()) {
+ this.shooter.damageEntity(DamageSource.FALL, event.getDamage());
+ }
}
// CraftBukkit end