From 06ad0f9310c0874494cd5bef870399cb6146bfd1 Mon Sep 17 00:00:00 2001 From: jfr Date: Wed, 12 Aug 2015 18:12:22 +0200 Subject: [PATCH] Reorder PlayerJoinEvent / UpstreamBridge initialization. Placing the PlayerJoinEvent in front of the Upstream Bridge handling prevents us from actually accessing the target server in PostJoinEvent handlers. --- .../main/java/net/md_5/bungee/connection/InitialHandler.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java index 93f19ac6..d252f7e2 100644 --- a/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java +++ b/proxy/src/main/java/net/md_5/bungee/connection/InitialHandler.java @@ -485,10 +485,8 @@ public class InitialHandler extends PacketHandler implements PendingConnection UserConnection userCon = new UserConnection( bungee, ch, getName(), InitialHandler.this ); userCon.init(); - bungee.getPluginManager().callEvent( new PostLoginEvent( userCon ) ); - ch.getHandle().pipeline().get( HandlerBoss.class ).setHandler( new UpstreamBridge( bungee, userCon ) ); - + bungee.getPluginManager().callEvent( new PostLoginEvent( userCon ) ); ServerInfo server; if ( bungee.getReconnectHandler() != null ) {