Remove Java version check once and for all (#7612)

Closes #7611
This commit is contained in:
Nassim Jahnke 2022-03-16 14:10:32 +01:00
parent 905e5cdc31
commit 5bbbb6fffc

View file

@ -1,20 +1,21 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
Date: Sat, 8 Feb 2020 18:02:24 -0600
Subject: [PATCH] Allow overriding the java version check
From: Nassim Jahnke <nassim@njahnke.dev>
Date: Wed, 16 Mar 2022 13:58:16 +0100
Subject: [PATCH] Remove garbage Java version check
-DPaper.IgnoreJavaVersion=true
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -0,0 +0,0 @@ public class Main {
System.err.println("Unsupported Java detected (" + javaVersion + "). This version of Minecraft requires at least Java 17. Check your Java version with the command 'java -version'.");
return;
}
if (javaVersion > 61.0) {
System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 17 is supported.");
- if (javaVersion > 61.0) {
- System.err.println("Unsupported Java detected (" + javaVersion + "). Only up to Java 17 is supported.");
- return;
+ if (!Boolean.getBoolean("Paper.IgnoreJavaVersion")) return; // Paper
}
- }
try {
// Paper start - Handled by TerminalConsoleAppender