summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/org/bukkit/material/SimpleAttachableMaterialData.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/material/SimpleAttachableMaterialData.java b/src/main/java/org/bukkit/material/SimpleAttachableMaterialData.java
index bc3a4ff8..b88c3f9b 100644
--- a/src/main/java/org/bukkit/material/SimpleAttachableMaterialData.java
+++ b/src/main/java/org/bukkit/material/SimpleAttachableMaterialData.java
@@ -35,7 +35,8 @@ public abstract class SimpleAttachableMaterialData extends MaterialData implemen
}
public BlockFace getFacing() {
- return getAttachedFace().getOppositeFace();
+ BlockFace attachedFace = getAttachedFace();
+ return attachedFace == null ? null : attachedFace.getOppositeFace();
}
@Override