public static Block getAttachedChest(Block block) {
        if (block.getType() == Material.CHEST)
            for (BlockFace face : new BlockFace[]{BlockFace.NORTH, BlockFace.EAST, BlockFace.SOUTH, BlockFace.WEST}) {
                Block b = block.getRelative(face);
                if (b.getType() == Material.CHEST) {
                    return b;
                }
            }
        return null;
    }