#3721: Improve same uuid and name checks
We didn't return so the login event was fired for a disconnected player
This commit is contained in:
parent
cd56fb32c2
commit
534148763f
@ -580,26 +580,6 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( isOnlineMode() )
|
|
||||||
{
|
|
||||||
// Check for multiple connections
|
|
||||||
// We have to check for the old name first
|
|
||||||
ProxiedPlayer oldName = bungee.getPlayer( getName() );
|
|
||||||
if ( oldName != null )
|
|
||||||
{
|
|
||||||
// TODO See #1218
|
|
||||||
disconnect( bungee.getTranslation( "already_connected_proxy" ) );
|
|
||||||
}
|
|
||||||
// And then also for their old UUID
|
|
||||||
ProxiedPlayer oldID = bungee.getPlayer( getUniqueId() );
|
|
||||||
if ( oldID != null )
|
|
||||||
{
|
|
||||||
// TODO See #1218
|
|
||||||
disconnect( bungee.getTranslation( "already_connected_proxy" ) );
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
// In offline mode the existing user stays and we kick the new one
|
|
||||||
ProxiedPlayer oldName = bungee.getPlayer( getName() );
|
ProxiedPlayer oldName = bungee.getPlayer( getName() );
|
||||||
if ( oldName != null )
|
if ( oldName != null )
|
||||||
{
|
{
|
||||||
@ -608,6 +588,16 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( isOnlineMode() )
|
||||||
|
{
|
||||||
|
// And then also for their old UUID
|
||||||
|
ProxiedPlayer oldID = bungee.getPlayer( getUniqueId() );
|
||||||
|
if ( oldID != null )
|
||||||
|
{
|
||||||
|
// TODO See #1218
|
||||||
|
disconnect( bungee.getTranslation( "already_connected_proxy" ) );
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Callback<LoginEvent> complete = new Callback<LoginEvent>()
|
Callback<LoginEvent> complete = new Callback<LoginEvent>()
|
||||||
|
Loading…
Reference in New Issue
Block a user