public static void loadSettingsFromJSON(JSONObject json, String tagToApply) {
        for (Object obj : (JSONArray)json.get("settings")) {
            JSONObject setting = (JSONObject)obj;
            if (tagToApply == null) {
                if (setting.get("tag") != null) {
                    setSetting(setting.get("name").toString(), setting.get("value").toString(), setting.get("tag").toString());
                } else {
                    setSetting(setting.get("name").toString(), setting.get("value").toString());
                }
            } else {
                if (setting.get("tag") != null) {
                    setSetting(setting.get("name").toString(), setting.get("value").toString(), setting.get("tag").toString());
                } else {
                    setSetting(setting.get("name").toString(), setting.get("value").toString(), tagToApply);
                }
            }
        }
    }