diff --git a/pom.xml b/pom.xml
index c534ef78..07827577 100755
--- a/pom.xml
+++ b/pom.xml
@@ -31,7 +31,7 @@
maven-compiler-plugin
3.8.0
- 1.8
+ 1.8
1.8
@@ -87,7 +87,7 @@
org.bukkit
bukkit
- 1.13-R0.1-SNAPSHOT
+ 1.14-R0.1-SNAPSHOT
shaded
provided
diff --git a/src/main/java/org/gestern/gringotts/Util.java b/src/main/java/org/gestern/gringotts/Util.java
index 780a5fd5..bc33df74 100644
--- a/src/main/java/org/gestern/gringotts/Util.java
+++ b/src/main/java/org/gestern/gringotts/Util.java
@@ -5,6 +5,7 @@
import org.bukkit.block.Block;
import org.bukkit.block.BlockFace;
import org.bukkit.block.Sign;
+import org.bukkit.block.data.type.WallSign;
import org.gestern.gringotts.currency.GringottsCurrency;
public class Util {
@@ -92,20 +93,20 @@ public static String format(double value) {
public static Block chestBlock(Sign sign) {
// is sign attached to a valid vault container?
Block signBlock = sign.getBlock();
- org.bukkit.material.Sign signData = (org.bukkit.material.Sign) signBlock.getState().getData();
- BlockFace attached = signData.getAttachedFace();
-
+ WallSign signData = (WallSign) signBlock.getState().getBlockData();
+ BlockFace attached = signData.getFacing().getOppositeFace();
+
// allow either the block sign is attached to or the block below the sign as chest block. Prefer attached block.
Block blockAttached = signBlock.getRelative(attached);
- Block blockBelow = signBlock.getRelative(BlockFace.DOWN);
+// Block blockBelow = signBlock.getRelative(BlockFace.DOWN);
if (validContainer(blockAttached.getType())) {
return blockAttached;
}
- if (validContainer(blockBelow.getType())) {
- return blockBelow;
- }
+// if (validContainer(blockBelow.getType())) {
+// return blockBelow;
+// }
return null; // no valid container
}
@@ -124,6 +125,7 @@ public static boolean validContainer(Material material) {
case FURNACE:
case HOPPER:
case DROPPER:
+ case BARREL:
return true;
default:
return false;