Avoid NPE during CraftBlockEntityState load
Dieser Commit ist enthalten in:
Ursprung
71e2d0e88c
Commit
60cdf86b8a
@ -0,0 +1,29 @@
|
|||||||
|
From 1c427c765b20086e3ee11f87d4e5ffb653067c43 Mon Sep 17 00:00:00 2001
|
||||||
|
From: kashike <kashike@vq.lc>
|
||||||
|
Date: Mon, 18 Sep 2017 13:38:40 -0700
|
||||||
|
Subject: [PATCH] Avoid NPE during CraftBlockEntityState load
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
|
||||||
|
index 266f87d7..22dcaea7 100644
|
||||||
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
|
||||||
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
|
||||||
|
@@ -24,6 +24,7 @@ public class CraftBlockEntityState<T extends TileEntity> extends CraftBlockState
|
||||||
|
|
||||||
|
// copy tile entity data:
|
||||||
|
this.snapshot = this.createSnapshot(tileEntity);
|
||||||
|
+ if(this.snapshot != null) // Paper - avoid NPE during load
|
||||||
|
this.load(snapshot);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -35,6 +36,7 @@ public class CraftBlockEntityState<T extends TileEntity> extends CraftBlockState
|
||||||
|
|
||||||
|
// copy tile entity data:
|
||||||
|
this.snapshot = this.createSnapshot(tileEntity);
|
||||||
|
+ if(this.snapshot != null) // Paper - avoid NPE during load
|
||||||
|
this.load(snapshot);
|
||||||
|
}
|
||||||
|
|
||||||
|
--
|
||||||
|
2.14.1
|
||||||
|
|
In neuem Issue referenzieren
Einen Benutzer sperren