aboutsummaryrefslogtreecommitdiff
path: root/sharedVariables/src/MinecraftVersion.kt
diff options
context:
space:
mode:
Diffstat (limited to 'sharedVariables/src/MinecraftVersion.kt')
-rw-r--r--sharedVariables/src/MinecraftVersion.kt3
1 files changed, 3 insertions, 0 deletions
diff --git a/sharedVariables/src/MinecraftVersion.kt b/sharedVariables/src/MinecraftVersion.kt
index 7384c8fbd..796cc0d70 100644
--- a/sharedVariables/src/MinecraftVersion.kt
+++ b/sharedVariables/src/MinecraftVersion.kt
@@ -16,6 +16,9 @@ enum class MinecraftVersion(
val javaLanguageVersion = JavaLanguageVersion.of(javaVersion)
+ val formattedJavaLanguageVersion: String
+ get() = if (javaVersion <= 8) "1.$javaVersion" else javaVersion.toString()
+
val versionNumber = run {
val parts = versionName.split('.').mapTo(mutableListOf()) { it.toInt() }
if (parts.size == 2) parts.add(0)