From 7bc9c08eb4b05a7cb778cc75731e1770669dc6b5 Mon Sep 17 00:00:00 2001 From: Nathan Wolf Date: Fri, 22 May 2015 19:42:09 -0700 Subject: [PATCH] Default to BlockFace.SELF for null directions in getFacing --- src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java index f9ce5ad333..411c023de1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java @@ -49,7 +49,9 @@ public class CraftHanging extends CraftEntity implements Hanging { } public BlockFace getFacing() { - switch (this.getHandle().direction) { + EnumDirection direction = this.getHandle().direction; + if (direction == null) return BlockFace.SELF; + switch (direction) { case SOUTH: default: return BlockFace.SOUTH;