From 7fab3ba3721204158f8831ac2ca31cf957c23b55 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 16 Jun 2013 21:27:15 +1000 Subject: [PATCH] Try twice to init jline --- proxy/src/main/java/net/md_5/bungee/BungeeCord.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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 d080b1b4..a1daee1c 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java @@ -123,7 +123,7 @@ public class BungeeCord extends ProxyServer new AsyncHttpClientConfig.Builder().setAsyncHttpClientProviderConfig( new NettyAsyncHttpProviderConfig().addProperty( NettyAsyncHttpProviderConfig.BOSS_EXECUTOR_SERVICE, executors ) ).setExecutorService( executors ).build() ) ); @Getter - private final ConsoleReader consoleReader; + private ConsoleReader consoleReader; @Getter private final Logger logger; @@ -151,7 +151,14 @@ public class BungeeCord extends ProxyServer public BungeeCord() throws IOException { - consoleReader = new ConsoleReader(); + try + { + consoleReader = new ConsoleReader(); + } catch ( Exception ex ) + { + System.setProperty( "jline.terminal", "jline.UnsupportedTerminal" ); + consoleReader = new ConsoleReader(); + } Runtime.getRuntime().addShutdownHook( new Thread( "JLine Cleanup Thread" ) { @Override