mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-19 15:09:25 +00:00
21 lines
1.2 KiB
Diff
21 lines
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
|
|
Date: Sat, 4 May 2024 02:46:17 -0400
|
|
Subject: [PATCH] Fix console freeze above JAVA 22
|
|
|
|
Revert to old console provider, Fix https://github.com/PaperMC/Paper/issues/10405
|
|
Solution refers to https://inside.java/2023/07/31/quality-heads-up
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
|
index 1bcca095e70f586af1758447c29314a4256666ce..d1565ffdb17460df4d788652e1c1afffba4e82d6 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
|
@@ -356,6 +356,7 @@ public class Main {
|
|
printlnStartupInfoToSystemOut("Loading libraries, please wait..."); // Gale - include time in startup logs
|
|
|
|
System.setProperty("org.jline.terminal.disableDeprecatedProviderWarning", "true"); // Leaf - Ignore terminal provider warning
|
|
+ if (org.galemc.gale.virtualthread.VirtualThreadService.getJavaMajorVersion() >= 22) System.setProperty("jdk.console", "java.base"); // Leaf - Fix console freeze above JAVA 22
|
|
|
|
net.minecraft.server.Main.main(options);
|
|
} catch (Throwable t) {
|