mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-02 13:07:06 +01:00
Fix TNT crashing servers when breaking item frames
This commit is contained in:
parent
8374c041ac
commit
653ca13f16
1 changed files with 22 additions and 0 deletions
|
@ -0,0 +1,22 @@
|
|||
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
|
||||
|
Loading…
Reference in a new issue