9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-20 23:49:31 +00:00
Files
Leaf/patches/server/0074-Fix-console-output-display-on-Pterodactyl-panel.patch
Dreeam 6acb949d2d Updated Upstream (Paper/Gale/Purpur)
Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@681c013 Bundle spark (#11093)
PaperMC/Paper@5fee9c6 Move configuration option to a system property
PaperMC/Paper@aa3b356 Improve server startup logging (#11110)
PaperMC/Paper@9aea240 Properly lookup plugin classes when looked up by spark
PaperMC/Paper@7e91a2c Update the bundled spark version

Gale Changes:
Dreeam-qwq/Gale@a4ed885 Updated Upstream (Paper)
Dreeam-qwq/Gale@3932464 [ci skip] Remove TODOs

Purpur Changes:
PurpurMC/Purpur@936c29a Updated Upstream (Paper)
PurpurMC/Purpur@032697e Updated Upstream (Paper)
PurpurMC/Purpur@b2d1fea always output bukkit/paper plugin header in plugin command
2024-07-21 08:02:22 +08:00

26 lines
1.5 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
Date: Thu, 27 Jun 2024 01:13:07 +0800
Subject: [PATCH] Fix console output display on Pterodactyl panel
Fixed console display issue when the terminal used xterm, should work on Pterodactyl, MCSManager and kind of panel software
diff --git a/src/main/java/io/papermc/paper/PaperBootstrap.java b/src/main/java/io/papermc/paper/PaperBootstrap.java
index fb19a2f9e219656aa89f6d82edc64bc0d68c1ff1..b4b3264ea7b3f6eb2d693af28a492620026287a8 100644
--- a/src/main/java/io/papermc/paper/PaperBootstrap.java
+++ b/src/main/java/io/papermc/paper/PaperBootstrap.java
@@ -20,6 +20,13 @@ public final class PaperBootstrap {
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
+ // Leaf start - Fix console output display on Pterodactyl panel
+ if (System.getProperty("terminal.jline", "false") != null && System.getProperty("terminal.ansi", "true") != null
+ && "xterm".equalsIgnoreCase(System.getenv("TERM"))) {
+ System.setProperty("terminal.jline", "false");
+ System.setProperty("terminal.ansi", "true");
+ }
+ // Leaf end - Fix console output display on Pterodactyl panel
Main.main(options);
}