Skip to content

Commit e5bc283

Browse files
authored
Merge pull request #4 from nacrt/patch-1
prevent crash when missing url
2 parents d35d4b2 + a92b468 commit e5bc283

File tree

1 file changed

+4
-3
lines changed
  • src/main/java/io/github/koxx12_dev/skyclient_installer_java

1 file changed

+4
-3
lines changed

src/main/java/io/github/koxx12_dev/skyclient_installer_java/MainCode.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,12 @@ public void code(List<String> mods, List<String> packs, String mc) throws IOExce
9595
String url;
9696
String file = (String) modsjson.getJSONObject(i).get("file");
9797

98-
if (id.equals("rpm")) {
99-
url = "https://github.com/nacrt/SkyblockClient-REPO/raw/main/files/mods/Resource_Pack_Manager_1.2.jar";
100-
} else {
98+
try {
10199
url = (String) modsjson.getJSONObject(i).get("url");
102100
}
101+
catch (Exception e) {
102+
url = "https://github.com/nacrt/SkyblockClient-REPO/raw/main/files/mods/" + file;
103+
}
103104

104105
modidToFile.put(id, file);
105106
modidToUrl.put(id, url);

0 commit comments

Comments
 (0)