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 = new GuiTextField(GuiConstants.LOGIN_USERNAME_FIELD, fontRendererObj, this.width / 2 - 45, 30, 145, 20);
|
||||||
username.setEnabled(true);
|
username.setEnabled(true);
|
||||||
username.setFocused(true);
|
username.setFocused(true);
|
||||||
|
username.setMaxStringLength(16);
|
||||||
|
|
||||||
password = new PasswordTextField(GuiConstants.LOGIN_PASSWORD_FIELD, fontRendererObj, this.width / 2 - 45, 60, 145, 20);
|
password = new PasswordTextField(GuiConstants.LOGIN_PASSWORD_FIELD, fontRendererObj, this.width / 2 - 45, 60, 145, 20);
|
||||||
password.setEnabled(true);
|
password.setEnabled(true);
|
||||||
|
|||||||
@@ -46,6 +46,8 @@ public class GuiRegister extends GuiScreen {
|
|||||||
|
|
||||||
if(!initialized) {
|
if(!initialized) {
|
||||||
usernameInput = new GuiTextField(GuiConstants.REGISTER_USERNAME_FIELD, fontRendererObj, this.width / 2 - 45, 30, 145, 20);
|
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);
|
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);
|
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);
|
passwordConfirmation = new PasswordTextField(GuiConstants.REGISTER_PASSWORD_CONFIRM_FIELD, fontRendererObj, this.width / 2 - 45, 120, 145, 20);
|
||||||
|
|||||||
@@ -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.authfailed=Authentication to the Minecraft Session Servers failed
|
||||||
replaymod.api.mcuserexists=A ReplayMod account is already associated with this Minecraft account
|
replaymod.api.mcuserexists=A ReplayMod account is already associated with this Minecraft account
|
||||||
replaymod.api.filetoobig=The uploaded file is too big
|
replaymod.api.filetoobig=The uploaded file is too big
|
||||||
|
replaymod.api.usernametoolong=The username is too long
|
||||||
|
|
||||||
#All of the chat messages
|
#All of the chat messages
|
||||||
replaymod.chat.recordingstarted=Recording started
|
replaymod.chat.recordingstarted=Recording started
|
||||||
|
|||||||
Reference in New Issue
Block a user