@@ -12,7 +12,7 @@ suspend fun update(gameDir: File): String {
1212 val jarsFolder = File (bundleFolder, " jars" )
1313 jarsFolder.mkdirs()
1414
15- info(" Fetching latest version from github..." )
15+ logger. info(" Fetching latest version from github..." )
1616 val latestRelease = http.get<GithubReleases >(" $githubApi /repos/BundleProject/Bundle/releases" )
1717 .firstOrNull()
1818 val latestTagName = latestRelease?.tagName
@@ -23,27 +23,27 @@ suspend fun update(gameDir: File): String {
2323 val versionFile = File (bundleFolder, " version.json" )
2424
2525 if (latestDownloadUrl != null && latestTagName != null ) {
26- info(" Found latest version: $latestTagName " )
26+ logger. info(" Found latest version: $latestTagName " )
2727
2828 val latestJar = File (jarsFolder, " bundle-$latestTagName .jar" )
2929
3030 if (! latestJar.exists()) {
31- important (" Downloading Bundle update..." )
31+ logger.info (" Downloading Bundle update..." )
3232 http.downloadFile(latestJar, latestDownloadUrl)
3333
34- info(" Writing latest version to json..." )
34+ logger. info(" Writing latest version to json..." )
3535 val json = JsonObject ()
3636 json.addProperty(" latest_version" , latestTagName)
3737
3838 versionFile.writeText(gson.toJson(json))
3939 } else {
40- important (" Bundle is already up to date!" )
40+ logger.info (" Bundle is already up to date!" )
4141 }
4242
4343 return latestTagName
4444 }
4545
46- err (" Failed to fetch latest release! Returning current latest version to continue safely." )
46+ logger.error (" Failed to fetch latest release! Returning current latest version to continue safely." )
4747 return versionFile.readText().let {
4848 gson.fromJson(it, JsonObject ::class .java).get(" latest_version" ).asString
4949 }
0 commit comments