Make it clear when users connected Bungee to itself.

This commit is contained in:
md_5 2016-02-17 10:34:04 +11:00
parent 848cad2a59
commit afc02082e6
2 changed files with 5 additions and 4 deletions

View File

@ -328,7 +328,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
// We can just check by UUID here as names are based on UUID
if ( !isOnlineMode() && bungee.getPlayer( getUniqueId() ) != null )
{
disconnect( bungee.getTranslation( "already_connected" ) );
disconnect( bungee.getTranslation( "already_connected_proxy" ) );
return;
}
@ -424,14 +424,14 @@ public class InitialHandler extends PacketHandler implements PendingConnection
if ( oldName != null )
{
// TODO See #1218
oldName.disconnect( bungee.getTranslation( "already_connected" ) );
oldName.disconnect( bungee.getTranslation( "already_connected_proxy" ) );
}
// And then also for their old UUID
ProxiedPlayer oldID = bungee.getPlayer( getUniqueId() );
if ( oldID != null )
{
// TODO See #1218
oldID.disconnect( bungee.getTranslation( "already_connected" ) );
oldID.disconnect( bungee.getTranslation( "already_connected_proxy" ) );
}
} else
{
@ -440,7 +440,7 @@ public class InitialHandler extends PacketHandler implements PendingConnection
if ( oldName != null )
{
// TODO See #1218
disconnect( bungee.getTranslation( "already_connected" ) );
disconnect( bungee.getTranslation( "already_connected_proxy" ) );
return;
}

View File

@ -1,5 +1,6 @@
alert=\u00a78[\u00a74Alert\u00a78]\u00a7r
already_connected=\u00a7cYou are already connected to this server!
already_connected_proxy=\u00a7cYou are already connected to this proxy!
already_connecting=\u00a7cAlready connecting to this server!
command_list=\u00a7a[{0}] \u00a7e({1}): \u00a7r{2}
connect_kick=\u00a7cKicked whilst connecting to {0}: {1}