9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2025-12-24 01:19:25 +00:00

Drop Fix MC-2025 to fix abnormal entity bounding box

This commit is contained in:
Dreeam
2024-07-13 19:36:45 +08:00
parent cf8716a368
commit 0e65d249be
27 changed files with 6 additions and 4 deletions

View File

@@ -0,0 +1,26 @@
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/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index c3c5cfbfd2d1f25d98d8dc0cca31fdc47d2af0bb..a0d67bab9f5efe137009b5d82e09a01f24a8e0a0 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -328,6 +328,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();