From ba61cc60b19a1be6055e8c15225c985037b83b90 Mon Sep 17 00:00:00 2001 From: The Judge Date: Mon, 4 Sep 2023 17:18:09 -0700 Subject: [PATCH] Revamp some mods handling --- lib/src/main/java/pojlib/instance/MinecraftInstance.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/main/java/pojlib/instance/MinecraftInstance.java b/lib/src/main/java/pojlib/instance/MinecraftInstance.java index 721091ab..07d00936 100644 --- a/lib/src/main/java/pojlib/instance/MinecraftInstance.java +++ b/lib/src/main/java/pojlib/instance/MinecraftInstance.java @@ -254,13 +254,13 @@ public boolean hasCustomMod(String name) { JsonObject objOld = GsonUtils.jsonFileToObject(modsOld.getAbsolutePath(), JsonObject.class); for (JsonElement verMod : objOld.getAsJsonArray(this.versionName)) { JsonObject object = verMod.getAsJsonObject(); - String slug = object.get("slug").getAsString().replace("-", " "); - if(name.equals(slug)) { + String slug = object.get("slug").getAsString(); + if(name.equalsIgnoreCase(slug)) { return true; } } } - if(info.name.equals(name)) { + if(info.name.equalsIgnoreCase(name)) { return true; } }