summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authorThinkofdeath <thinkofdeath@spigotmc.org>2015-02-02 20:27:12 +0000
committerThinkofdeath <thinkofdeath@spigotmc.org>2015-02-02 20:27:12 +0000
commit4c6df1b96b0ab1636cfc52d28dde6f4b67108c5a (patch)
tree1dcda356509e9386b7043f57b4c67ccbdeb84b65 /nms-patches
parentbbf72f30606084e61b28a7521f46c9c34caeaeda (diff)
downloadcraftbukkit-4c6df1b96b0ab1636cfc52d28dde6f4b67108c5a.tar
craftbukkit-4c6df1b96b0ab1636cfc52d28dde6f4b67108c5a.tar.gz
craftbukkit-4c6df1b96b0ab1636cfc52d28dde6f4b67108c5a.tar.lz
craftbukkit-4c6df1b96b0ab1636cfc52d28dde6f4b67108c5a.tar.xz
craftbukkit-4c6df1b96b0ab1636cfc52d28dde6f4b67108c5a.zip
Fix a null pointer in ShapeDetectorBlock
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/ShapeDetectorBlock.patch15
1 files changed, 15 insertions, 0 deletions
diff --git a/nms-patches/ShapeDetectorBlock.patch b/nms-patches/ShapeDetectorBlock.patch
new file mode 100644
index 00000000..9a28dffc
--- /dev/null
+++ b/nms-patches/ShapeDetectorBlock.patch
@@ -0,0 +1,15 @@
+--- ../work/decompile-8eb82bde//net/minecraft/server/ShapeDetectorBlock.java 2015-02-02 20:26:40.044135504 +0000
++++ src/main/java/net/minecraft/server/ShapeDetectorBlock.java 2015-02-02 20:26:40.056135504 +0000
+@@ -16,8 +16,10 @@
+ }
+
+ public IBlockData a() {
+- if (this.c == null && this.a.isLoaded(this.b)) {
+- this.c = this.a.getType(this.b);
++ // CraftBukkit start - fix null pointer
++ if (this.c == null) {
++ this.c = this.a.isLoaded(this.b) ? this.a.getType(this.b) : Blocks.AIR.getBlockData();
++ // CraftBukkit end
+ }
+
+ return this.c;