Fix LoginEvent not being called.

If the server is in offline mode, the LoginEvent should be called.
This commit is contained in:
Robin Lambertz 2013-04-10 14:47:57 +02:00
parent edceaf072c
commit 8cac038a07

View File

@ -176,13 +176,14 @@ public class InitialHandler extends PacketHandler implements PendingConnection
old.disconnect( "You are already connected to the server" ); old.disconnect( "You are already connected to the server" );
} }
}
// fire login event // fire login event
LoginEvent event = new LoginEvent( InitialHandler.this ); LoginEvent event = new LoginEvent( InitialHandler.this );
if ( bungee.getPluginManager().callEvent( event ).isCancelled() ) if ( bungee.getPluginManager().callEvent( event ).isCancelled() )
{ {
disconnect( event.getCancelReason() ); disconnect( event.getCancelReason() );
} }
}
Cipher encrypt = EncryptionUtil.getCipher( Cipher.ENCRYPT_MODE, shared ); Cipher encrypt = EncryptionUtil.getCipher( Cipher.ENCRYPT_MODE, shared );
Cipher decrypt = EncryptionUtil.getCipher( Cipher.DECRYPT_MODE, shared ); Cipher decrypt = EncryptionUtil.getCipher( Cipher.DECRYPT_MODE, shared );