From 7af538793c28fd32c1a8614989fb49c7b9fb9b84 Mon Sep 17 00:00:00 2001 From: Nathan Poirier Date: Sun, 8 Jul 2018 01:59:30 +0200 Subject: [PATCH] #2450: Instantiate PluginManager (and EventBus) after the BungeeCord Logger --- .../src/main/java/net/md_5/bungee/BungeeCord.java | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 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 5ca4fe8a..d0b98736 100644 --- a/proxy/src/main/java/net/md_5/bungee/BungeeCord.java +++ b/proxy/src/main/java/net/md_5/bungee/BungeeCord.java @@ -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() )