diff --git a/bootstrap/src/main/java/net/md_5/bungee/Bootstrap.java b/bootstrap/src/main/java/net/md_5/bungee/Bootstrap.java index f05b0d3e..b7cb81e2 100644 --- a/bootstrap/src/main/java/net/md_5/bungee/Bootstrap.java +++ b/bootstrap/src/main/java/net/md_5/bungee/Bootstrap.java @@ -1,7 +1,5 @@ package net.md_5.bungee; -import org.fusesource.jansi.AnsiConsole; - public class Bootstrap { @@ -14,8 +12,6 @@ public class Bootstrap return; } - AnsiConsole.systemInstall(); - BungeeCordLauncher.main( args ); } } diff --git a/proxy/pom.xml b/proxy/pom.xml index 65b065b1..8c5b61c6 100644 --- a/proxy/pom.xml +++ b/proxy/pom.xml @@ -74,12 +74,6 @@ 3.18.2-GA runtime - - org.fusesource.jansi - jansi - 1.11 - compile - diff --git a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java index d59bcc87..d2fdcd26 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java @@ -180,8 +180,17 @@ public class BungeeCord extends ProxyServer bundle = ResourceBundle.getBundle( "messages", Locale.ENGLISH ); } - Log.setOutput( new PrintStream( ByteStreams.nullOutputStream() ) ); // TODO: Bug JLine + // This is a workaround for quite possibly the weirdest bug I have ever encountered in my life! + // 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 + // BungeeCord. This version is only used when extracting the libraries to their temp folder. + System.setProperty( "library.jansi.version", "BungeeCord" ); + AnsiConsole.systemInstall(); consoleReader = new ConsoleReader(); consoleReader.setExpandEvents( false ); @@ -189,12 +198,6 @@ public class BungeeCord extends ProxyServer System.setErr( new PrintStream( new LoggingOutputStream( logger, Level.SEVERE ), true ) ); System.setOut( new PrintStream( new LoggingOutputStream( logger, Level.INFO ), true ) ); - if ( consoleReader.getTerminal() instanceof UnsupportedTerminal ) - { - logger.info( "Unable to initialize fancy terminal. To fix this on Windows, install the correct Microsoft Visual C++ 2008 Runtime" ); - logger.info( "NOTE: This error is non crucial, and BungeeCord will still function correctly! Do not bug the author about it unless you are still unable to get it working" ); - } - if ( NativeCipher.load() ) { logger.info( "Using OpenSSL based native cipher." );