fix: issue with the forge library type adapter from 02d7b83
This commit is contained in:
parent
7a97d6edab
commit
4c8e5425e0
2 changed files with 3 additions and 2 deletions
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
|
@ -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",
|
||||
|
|
|
@ -40,7 +40,8 @@ public class LibraryTypeAdapter implements JsonDeserializer<Library> {
|
|||
} 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");
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue