From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Date: Tue, 26 Dec 2023 02:04:01 -0500 Subject: [PATCH] Fix TerminalConsoleAppender NPE error on server closed and other issues Removed since 1.20.4 TODO - Dreeam: Fix error on shutdown This patch use own fork of terminalconsoleappender to fix some issues, since the original version doesn't compatible with latest version of jline or log4j You can find the fork on https://github.com/Dreeam-qwq/TerminalConsoleAppender Fixed NPE error when server losed. Fixed errors in console has no color,also fixed`Advanced terminal features are not available in this environment` or `Unable to create terminal` like issues diff --git a/build.gradle.kts b/build.gradle.kts index 00c01da244709b68448815e9188414d70440d59b..08194b0dce494013a9766e8c84b5697876c0d35f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -33,7 +33,7 @@ dependencies { // Paper start implementation("org.jline:jline-terminal-jansi:3.26.0") // Leaf - Bump Dependencies - implementation("net.minecrell:terminalconsoleappender:1.3.0") + implementation("com.github.Dreeam-qwq:TerminalConsoleAppender:360a0759") // Leaf - Use own TerminalConsoleAppender fork to fix some issues under latest version of jline/log4j implementation("net.kyori:adventure-text-serializer-ansi:4.16.0") // Keep in sync with adventureVersion from Paper-API build file // Leaf - Bump Dependencies implementation("net.kyori:ansi:1.0.3") // Manually bump beyond above transitive dep /* diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index c4ccba8e24c0511d81d0f138977c2621e34b888e..e0ee41855a82008bf09de7222671a106073ec761 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -1280,10 +1280,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop