Skip to content
This repository was archived by the owner on Nov 28, 2025. It is now read-only.

Commit f0e962f

Browse files
committed
disable update checker as its broken anyway
1 parent d7f2ccf commit f0e962f

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/main/kotlin/io/github/dockyardmc/utils/UpdateChecker.kt

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,24 @@ class UpdateChecker {
1717
companion object {
1818
val LOG_TYPE = CustomLogType("\uFE0F Update Checker", AnsiPair.ORANGE)
1919
}
20-
21-
init {
22-
val client = HttpClient.newHttpClient()
23-
val request = HttpRequest.newBuilder().uri(URI("https://mvn.devos.one/api/maven/details/releases/io/github/dockyardmc/dockyard")).build()
24-
client.sendAsync(request, BodyHandlers.ofString()).thenAccept { res ->
25-
val response = Json.decodeFromString<ReposliteResponse>(res.body())
26-
val latestVersion = response.files.last { file -> file.type == "DIRECTORY" }.name
27-
val publishedVersionContainCurrentVersion = response.files.firstOrNull { file -> file.name == DockyardServer.versionInfo.dockyardVersion } != null
28-
29-
if(latestVersion != DockyardServer.versionInfo.dockyardVersion) {
30-
if(!publishedVersionContainCurrentVersion) {
31-
log("You are currently running an outdated DockyardMC version. Consider updating to the latest ($latestVersion)", LOG_TYPE)
32-
} else {
33-
log("You are currently running a developer version of DockyardMC. Things might be VERY broken", LOG_TYPE)
34-
}
35-
}
36-
}
37-
}
20+
//
21+
// init {
22+
// val client = HttpClient.newHttpClient()
23+
// val request = HttpRequest.newBuilder().uri(URI("https://mvn.devos.one/api/maven/details/releases/io/github/dockyardmc/dockyard")).build()
24+
// client.sendAsync(request, BodyHandlers.ofString()).thenAccept { res ->
25+
// val response = Json.decodeFromString<ReposliteResponse>(res.body())
26+
// val latestVersion = response.files.last { file -> file.type == "DIRECTORY" }.name
27+
// val publishedVersionContainCurrentVersion = response.files.firstOrNull { file -> file.name == DockyardServer.versionInfo.dockyardVersion } != null
28+
//
29+
// if(latestVersion != DockyardServer.versionInfo.dockyardVersion) {
30+
// if(!publishedVersionContainCurrentVersion) {
31+
// log("You are currently running an outdated DockyardMC version. Consider updating to the latest ($latestVersion)", LOG_TYPE)
32+
// } else {
33+
// log("You are currently running a developer version of DockyardMC. Things might be VERY broken", LOG_TYPE)
34+
// }
35+
// }
36+
// }
37+
// }
3838

3939
@Serializable
4040
data class ReposliteResponse(

0 commit comments

Comments
 (0)