Try twice to init jline

This commit is contained in:
md_5 2013-06-16 21:27:15 +10:00
parent 92c3ef1989
commit 7fab3ba372

View File

@ -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;
@ -150,8 +150,15 @@ public class BungeeCord extends ProxyServer
}
public BungeeCord() throws IOException
{
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