-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
46d9135
commit f0e36a8
Showing
10 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
patches/server/0077-Fix-console-output-display-on-Pterodactyl-panel.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Dreeam <[email protected]> | ||
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/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java | ||
index f310722b6f6b5e487e876e42070fdaaa01b62efb..6e2f045f26949c03750d6ee3518c6664b132c948 100644 | ||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java | ||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java | ||
@@ -358,6 +358,14 @@ public class Main { | ||
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 | ||
+ | ||
net.minecraft.server.Main.main(options); | ||
} catch (Throwable t) { | ||
t.printStackTrace(); |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.