9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2026-01-04 15:41:40 +00:00

Updated Upstream (Leaves) & Add back Jade protocol support

This commit is contained in:
Dreeam
2024-06-05 20:28:50 +08:00
parent daa098084e
commit 44da3463cb
52 changed files with 2424 additions and 1030 deletions

View File

@@ -0,0 +1,20 @@
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) {