Kick only in online mode: #1382

This commit is contained in:
md_5 2015-02-28 12:59:40 +11:00
parent e1951c5d66
commit f2673c5876

View File

@ -415,6 +415,8 @@ public class InitialHandler extends PacketHandler implements PendingConnection
} }
private void finish() private void finish()
{
if ( isOnlineMode() )
{ {
// Check for multiple connections // Check for multiple connections
// We have to check for the old name first // We have to check for the old name first
@ -431,6 +433,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
// TODO See #1218 // TODO See #1218
oldID.disconnect( bungee.getTranslation( "already_connected" ) ); oldID.disconnect( bungee.getTranslation( "already_connected" ) );
} }
}
offlineId = java.util.UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + getName() ).getBytes( Charsets.UTF_8 ) ); offlineId = java.util.UUID.nameUUIDFromBytes( ( "OfflinePlayer:" + getName() ).getBytes( Charsets.UTF_8 ) );
if ( uniqueId == null ) if ( uniqueId == null )