Set maximum username length to 16

This commit is contained in:
CrushedPixel
2015-06-04 17:10:10 +02:00
parent 99718a1316
commit 466727e285
3 changed files with 4 additions and 0 deletions

View File

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

View File

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

View File

@@ -26,6 +26,7 @@ replaymod.api.nopermissions=You don't have permission to do this
replaymod.api.authfailed=Authentication to the Minecraft Session Servers failed
replaymod.api.mcuserexists=A ReplayMod account is already associated with this Minecraft account
replaymod.api.filetoobig=The uploaded file is too big
replaymod.api.usernametoolong=The username is too long
#All of the chat messages
replaymod.chat.recordingstarted=Recording started