Skip to content

Commit

Permalink
fix: Check for NeoForge installer availability
Browse files Browse the repository at this point in the history
  • Loading branch information
Griefed committed Sep 7, 2023
1 parent f8b7a9a commit 7c230f4
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -848,11 +848,10 @@ actual class ServerPackHandler actual constructor(
override fun serverDownloadable(mcVersion: String, modloader: String, modloaderVersion: String) = when (modloader) {
"Fabric" -> utilities.webUtilities.isReachable(versionMeta.fabric.releaseInstallerUrl())

"Forge" -> (versionMeta.forge.getForgeInstance(
mcVersion, modloaderVersion
).isPresent && utilities.webUtilities.isReachable(
versionMeta.forge.getForgeInstance(mcVersion, modloaderVersion).get().installerUrl
))
"Forge" -> {
val instance = versionMeta.forge.getForgeInstance(mcVersion, modloaderVersion)
instance.isPresent && utilities.webUtilities.isReachable(instance.get().installerUrl)
}

"Quilt" -> utilities.webUtilities.isReachable(versionMeta.quilt.releaseInstallerUrl())

Expand All @@ -864,6 +863,11 @@ actual class ServerPackHandler actual constructor(
}
}

"NeoForge" -> {
val instance = versionMeta.neoForge.getNeoForgeInstance(mcVersion,modloaderVersion)
instance.isPresent && utilities.webUtilities.isReachable(instance.get().installerUrl)
}

else -> false
}

Expand Down

0 comments on commit 7c230f4

Please sign in to comment.