reduce faststat java major version

This commit is contained in:
alexcrea 2026-03-09 22:16:35 +01:00
parent 6a4c861eab
commit 6afe51acca
Signed by: alexcrea
GPG key ID: E346CD16413450E3

View file

@ -32,10 +32,10 @@ object MetricsUtil {
} }
if(metricType.allowFastStats) { if(metricType.allowFastStats) {
// Check support java 21 (metric only work in java 21) // Check support java 17 (metric only work in java 17)
val versionParts = System.getProperty("java.version").split(".") val versionParts = System.getProperty("java.version").split(".")
val majorVersion = versionParts[0].toInt() val majorVersion = versionParts[0].toInt()
if (majorVersion >= 21) try { if (majorVersion >= 17) try {
faststatTelemetry(plugin, nmsType, isAlpha) faststatTelemetry(plugin, nmsType, isAlpha)
} catch (_: Throwable) {} } catch (_: Throwable) {}
} }