Block really wrong offline mode names, see #1270

This commit is contained in:
md_5
2014-11-08 10:04:59 +11:00
parent 56c372a3ce
commit 532a94382b
2 changed files with 7 additions and 0 deletions

View File

@@ -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" ) );