diff --git a/.vscode/launch.json b/.vscode/launch.json index f24877ca..729003bd 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -9,7 +9,7 @@ "projectName": "ATLauncher", "cwd": "${workspaceFolder}/testLauncher", "preLaunchTask": "createTestLauncherDir", - "args": "--debug --disable-error-reporting --no-launcher-update" + "args": "--debug --debug-level=5 --disable-error-reporting --no-launcher-update" }, { "type": "java", diff --git a/src/main/java/com/atlauncher/data/minecraft/LibraryTypeAdapter.java b/src/main/java/com/atlauncher/data/minecraft/LibraryTypeAdapter.java index d9b29b4c..0188f812 100644 --- a/src/main/java/com/atlauncher/data/minecraft/LibraryTypeAdapter.java +++ b/src/main/java/com/atlauncher/data/minecraft/LibraryTypeAdapter.java @@ -40,7 +40,8 @@ public class LibraryTypeAdapter implements JsonDeserializer { } else { library = new Gson().fromJson(object, Library.class); - if (library.name.contains("forge") && library.downloads.artifact.url.endsWith("-launcher.jar")) { + if (library.name.contains("forge") && library.downloads != null && library.downloads.artifact != null + && library.downloads.artifact.url.endsWith("-launcher.jar")) { library.downloads.artifact.url = library.downloads.artifact.url.replace("-launcher.jar", ".jar"); } }