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 29a26b45f2dea70a3b72f08d88882c62b47e3382..c3c5cfbfd2d1f25d98d8dc0cca31fdc47d2af0bb 100644 --- a/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java @@ -326,6 +326,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) {