diff options
author | Nathan Wolf <nathan@elmakers.com> | 2015-05-22 19:42:09 -0700 |
---|---|---|
committer | md_5 <git@md-5.net> | 2015-05-24 09:25:02 +1000 |
commit | 7bc9c08eb4b05a7cb778cc75731e1770669dc6b5 (patch) | |
tree | dd967c95203ecf0115ae8840d0a09258bca70ae0 /src/main | |
parent | 961287a4cc402839973d407b0cacc6a94bfda2a9 (diff) | |
download | craftbukkit-7bc9c08eb4b05a7cb778cc75731e1770669dc6b5.tar craftbukkit-7bc9c08eb4b05a7cb778cc75731e1770669dc6b5.tar.gz craftbukkit-7bc9c08eb4b05a7cb778cc75731e1770669dc6b5.tar.lz craftbukkit-7bc9c08eb4b05a7cb778cc75731e1770669dc6b5.tar.xz craftbukkit-7bc9c08eb4b05a7cb778cc75731e1770669dc6b5.zip |
Default to BlockFace.SELF for null directions in getFacing
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java index f9ce5ad3..411c023d 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; |