From 8cac038a0734f7dc11d02651c6a06021d785dae1 Mon Sep 17 00:00:00 2001 From: Robin Lambertz Date: Wed, 10 Apr 2013 14:47:57 +0200 Subject: [PATCH] Fix LoginEvent not being called. If the server is in offline mode, the LoginEvent should be called. --- .../md_5/bungee/connection/InitialHandler.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 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 cb5c7848..66570331 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 @@ -175,15 +175,16 @@ public class InitialHandler extends PacketHandler implements PendingConnection { old.disconnect( "You are already connected to the server" ); } - - // fire login event - LoginEvent event = new LoginEvent( InitialHandler.this ); - if ( bungee.getPluginManager().callEvent( event ).isCancelled() ) - { - disconnect( event.getCancelReason() ); - } + } - + + // fire login event + LoginEvent event = new LoginEvent( InitialHandler.this ); + if ( bungee.getPluginManager().callEvent( event ).isCancelled() ) + { + disconnect( event.getCancelReason() ); + } + Cipher encrypt = EncryptionUtil.getCipher( Cipher.ENCRYPT_MODE, shared ); Cipher decrypt = EncryptionUtil.getCipher( Cipher.DECRYPT_MODE, shared ); ch.write( new PacketFCEncryptionResponse() );