public static AccessDelegate getDelegate(Block block) {
        MaterialData data = block.getState().getData();
        if (data instanceof Door) {
            return new DoorAccessDelegate(block, (Door) data);
        } else if (data instanceof Bed) {
            return new BedAccessDelegate(block, (Bed) data);
        } else if (block.getType() == Material.CHEST) {
            return new ChestAccessDelegate(block, data);
        } else {
            return new AccessDelegate<MaterialData>(block, data) {
                @Override
                protected boolean shouldDelegate() {
                    return false;
                }
                @Override
                protected void delegate() {
                }
            };
        }
    }