Archiviert
13
0
Dieses Repository wurde am 2024-12-25 archiviert. Du kannst Dateien ansehen und es klonen, aber nicht pushen oder Issues/Pull-Requests öffnen.
Paper-Old/Spigot-Server-Patches/0211-Workaround-for-jansi-bug-with-Windows.patch
Zach Brown 9d6bb9d4c8
Bump outdated build notification back out to norm
Merge outdated notification patch into existing branding patch
2017-05-26 22:46:27 -05:00

30 Zeilen
1.5 KiB
Diff

From 6e358e579628685730d344c55695e30694525cc0 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Wed, 17 May 2017 17:45:19 -0500
Subject: [PATCH] Workaround for jansi bug with Windows
When jansi attempts to extract its natives, by default it tries to extract a specific version
using the loading class's implementation version. Normally this works completely fine
however when on Windows certain characters such as - and : can trigger special behaviour.
Furthermore this behaviour only occurs in specific combinations due to the parsing done by jansi.
For example test-test works fine, but test-test-test does not! In order to avoid this all together but
still keep our versions the same as they were, we set the override property to the essentially garbage version
Paper. This version is only used when extracting the libraries to their temp folder.
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 1cbcc3dfa..98e27fa25 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -182,6 +182,7 @@ public class Main {
}
if (useJline) {
+ System.setProperty( "library.jansi.version", "Paper" ); // Paper - set jansi library version to avoid crash
AnsiConsole.systemInstall();
} else {
// This ensures the terminal literal will always match the jline implementation
--
2.13.0.windows.1