#3142: Remove redundant name length check in InitialHandler

This check is not needed anymore as the player gets kicked while reading the LoginRequest packet if the name length is longer than 16
This commit is contained in:
Outfluencer 2021-07-04 01:40:47 +02:00 committed by GitHub
parent 061a7c67bd
commit b9da505efe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 7 deletions

View File

@ -360,12 +360,6 @@ public class InitialHandler extends PacketHandler implements PendingConnection
return; return;
} }
if ( getName().length() > 16 )
{
disconnect( bungee.getTranslation( "name_too_long" ) );
return;
}
int limit = BungeeCord.getInstance().config.getPlayerLimit(); int limit = BungeeCord.getInstance().config.getPlayerLimit();
if ( limit > 0 && bungee.getOnlineCount() >= limit ) if ( limit > 0 && bungee.getOnlineCount() >= limit )
{ {

View File

@ -21,7 +21,6 @@ server_kick=[Kicked]
server_list=\u00a76You may connect to the following servers at this time: 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 a fallback server server_went_down=\u00a7cThe server you were previously on went down, you have been connected to a fallback server
total_players=Total players online: {0} total_players=Total players online: {0}
name_too_long=Cannot have username longer than 16 characters
name_invalid=Username contains invalid characters. name_invalid=Username contains invalid characters.
ping_cannot_connect=\u00a7c[Bungee] Can''t connect to server. ping_cannot_connect=\u00a7c[Bungee] Can''t connect to server.
offline_mode_player=Not authenticated with Minecraft.net offline_mode_player=Not authenticated with Minecraft.net