Paper/CraftBukkit-Patches/0073-Fix-TNT-crashing-servers-when-breaking-item-frames.patch
2013-12-09 11:37:51 +00:00

23 lines
1.1 KiB
Diff

From 0a5e2023327936a1a8cfacfa8dd75d7bd62e5b73 Mon Sep 17 00:00:00 2001
From: TheUnnamedDude <kevin.sillerud@gmail.com>
Date: Mon, 9 Dec 2013 11:31:54 +0000
Subject: [PATCH] Fix TNT crashing servers when breaking item frames
diff --git a/src/main/java/net/minecraft/server/EntityItemFrame.java b/src/main/java/net/minecraft/server/EntityItemFrame.java
index 059a1e8..bb7110b 100644
--- a/src/main/java/net/minecraft/server/EntityItemFrame.java
+++ b/src/main/java/net/minecraft/server/EntityItemFrame.java
@@ -24,7 +24,7 @@ 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) {
+ if (damagesource.getEntity() != null && (org.bukkit.craftbukkit.event.CraftEventFactory.handleEntityDamageEvent(this, damagesource, f).isCancelled() || this.dead)) {
return false;
}
// CraftBukkit end
--
1.8.4.msysgit.0