Set maximum username length to 16
This commit is contained in:
@@ -50,6 +50,7 @@ public class GuiLoginPrompt extends GuiScreen {
|
||||
username = new GuiTextField(GuiConstants.LOGIN_USERNAME_FIELD, fontRendererObj, this.width / 2 - 45, 30, 145, 20);
|
||||
username.setEnabled(true);
|
||||
username.setFocused(true);
|
||||
username.setMaxStringLength(16);
|
||||
|
||||
password = new PasswordTextField(GuiConstants.LOGIN_PASSWORD_FIELD, fontRendererObj, this.width / 2 - 45, 60, 145, 20);
|
||||
password.setEnabled(true);
|
||||
|
||||
@@ -46,6 +46,8 @@ public class GuiRegister extends GuiScreen {
|
||||
|
||||
if(!initialized) {
|
||||
usernameInput = new GuiTextField(GuiConstants.REGISTER_USERNAME_FIELD, fontRendererObj, this.width / 2 - 45, 30, 145, 20);
|
||||
usernameInput.setMaxStringLength(16);
|
||||
|
||||
mailInput = new GuiTextField(GuiConstants.REGISTER_MAIL_FIELD, fontRendererObj, this.width / 2 - 45, 60, 145, 20);
|
||||
passwordInput = new PasswordTextField(GuiConstants.REGISTER_PASSWORD_FIELD, fontRendererObj, this.width / 2 - 45, 90, 145, 20);
|
||||
passwordConfirmation = new PasswordTextField(GuiConstants.REGISTER_PASSWORD_CONFIRM_FIELD, fontRendererObj, this.width / 2 - 45, 120, 145, 20);
|
||||
|
||||
Reference in New Issue
Block a user