#2450: Instantiate PluginManager (and EventBus) after the BungeeCord Logger

This commit is contained in:
Nathan Poirier 2018-07-08 01:59:30 +02:00 committed by md-5
parent 730715e68b
commit 7af538793c

View File

@ -138,7 +138,7 @@ public class BungeeCord extends ProxyServer
* Plugin manager.
*/
@Getter
public final PluginManager pluginManager = new PluginManager( this );
public final PluginManager pluginManager;
@Getter
@Setter
private ReconnectHandler reconnectHandler;
@ -170,12 +170,6 @@ public class BungeeCord extends ProxyServer
{
// TODO: Proper fallback when we interface the manager
getPluginManager().registerCommand( null, new CommandReload() );
getPluginManager().registerCommand( null, new CommandEnd() );
getPluginManager().registerCommand( null, new CommandIP() );
getPluginManager().registerCommand( null, new CommandBungee() );
getPluginManager().registerCommand( null, new CommandPerms() );
registerChannel( "BungeeCord" );
}
@ -220,6 +214,13 @@ 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 ) );
pluginManager = new PluginManager( this );
getPluginManager().registerCommand( null, new CommandReload() );
getPluginManager().registerCommand( null, new CommandEnd() );
getPluginManager().registerCommand( null, new CommandIP() );
getPluginManager().registerCommand( null, new CommandBungee() );
getPluginManager().registerCommand( null, new CommandPerms() );
if ( !Boolean.getBoolean( "net.md_5.bungee.native.disable" ) )
{
if ( EncryptionUtil.nativeFactory.load() )