summaryrefslogtreecommitdiffstats
path: root/nms-patches/EntityItemFrame.patch
blob: 753d8ff6cdd9982be138d8b8d9f174587f2eadc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--- ../work/decompile-8eb82bde//net/minecraft/server/EntityItemFrame.java	2014-11-28 17:43:43.113707435 +0000
+++ src/main/java/net/minecraft/server/EntityItemFrame.java	2014-11-28 17:38:20.000000000 +0000
@@ -27,6 +27,12 @@
             return false;
         } else if (!damagesource.isExplosion() && this.getItem() != null) {
             if (!this.world.isStatic) {
+                // CraftBukkit start - fire EntityDamageEvent
+                if (org.bukkit.craftbukkit.event.CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f, false) || this.dead) {
+                    return true;
+                }
+                // CraftBukkit end
+                
                 this.a(damagesource.getEntity(), false);
                 this.setItem((ItemStack) null);
             }