public static SaveTarget getSaveTarget(String type, Properties settings) {
        final Class<? extends SaveTarget> target = saveTargetTypes.get(type);
        if (target == null) {
            return null;
        }
        try {
            return target.getConstructor(Properties.class).newInstance(settings);
        } catch (Exception e) {
            throw new Error(e);
        }
    }