mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-12-25 01:57:55 +01:00
#3355,#3357: Fix possible NPE's in LoginEvent & PreLoginEvent
This commit is contained in:
parent
587fb37bdf
commit
12e4514813
@ -428,7 +428,8 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
{
|
||||
if ( result.isCancelled() )
|
||||
{
|
||||
disconnect( result.getCancelReasonComponents() );
|
||||
BaseComponent[] reason = result.getCancelReasonComponents();
|
||||
disconnect( ( reason != null ) ? reason : TextComponent.fromLegacyText( bungee.getTranslation( "kick_message" ) ) );
|
||||
return;
|
||||
}
|
||||
if ( ch.isClosed() )
|
||||
@ -551,7 +552,8 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
{
|
||||
if ( result.isCancelled() )
|
||||
{
|
||||
disconnect( result.getCancelReasonComponents() );
|
||||
BaseComponent[] reason = result.getCancelReasonComponents();
|
||||
disconnect( ( reason != null ) ? reason : TextComponent.fromLegacyText( bungee.getTranslation( "kick_message" ) ) );
|
||||
return;
|
||||
}
|
||||
if ( ch.isClosed() )
|
||||
|
Loading…
Reference in New Issue
Block a user