diff options
-rw-r--r-- | src/main/java/net/minecraft/server/EntityItemFrame.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/EntityItemFrame.java b/src/main/java/net/minecraft/server/EntityItemFrame.java index 059a1e8a..12d05064 100644 --- a/src/main/java/net/minecraft/server/EntityItemFrame.java +++ b/src/main/java/net/minecraft/server/EntityItemFrame.java @@ -24,10 +24,12 @@ public class EntityItemFrame extends EntityHanging { } else if (this.getItem() != null) { if (!this.world.isStatic) { // CraftBukkit start - if (org.bukkit.craftbukkit.event.CraftEventFactory.handleEntityDamageEvent(this, damagesource, f).isCancelled() || this.dead) { - return false; + org.bukkit.event.entity.EntityDamageEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.handleEntityDamageEvent(this, damagesource, f); + if ((event != null && event.isCancelled()) || this.dead) { + return true; } // CraftBukkit end + this.b(damagesource.getEntity(), false); this.setItem((ItemStack) null); } |