mirror of
https://github.com/SpigotMC/BungeeCord.git
synced 2024-12-25 10:07:38 +01:00
Block really wrong offline mode names, see #1270
This commit is contained in:
parent
56c372a3ce
commit
532a94382b
@ -268,6 +268,12 @@ public class InitialHandler extends PacketHandler implements PendingConnection
|
||||
return;
|
||||
}
|
||||
|
||||
if ( getName().contains( "." ) )
|
||||
{
|
||||
disconnect( bungee.getTranslation( "name_invalid" ) );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( getName().length() > 16 )
|
||||
{
|
||||
disconnect( bungee.getTranslation( "name_too_long" ) );
|
||||
|
@ -21,4 +21,5 @@ server_list=\u00a76You may connect to the following servers at this time:
|
||||
server_went_down=\u00a7cThe server you were previously on went down, you have been connected to the lobby
|
||||
total_players=Total players online: {0}
|
||||
name_too_long=Cannot have username longer than 16 characters
|
||||
name_invalid=Username contains invalid characters.
|
||||
ping_cannot_connect=\u00a7c[Bungee] Can't connect to server.
|
||||
|
Loading…
Reference in New Issue
Block a user