Set max chat length to 32767

master
mckuhei 2 years ago
parent 5ae837f1f8
commit 500cf05da1

@ -47,7 +47,7 @@ public class GuiChat extends GuiScreen
Keyboard.enableRepeatEvents(true); Keyboard.enableRepeatEvents(true);
this.sentHistoryCursor = this.mc.ingameGUI.getChatGUI().func_73756_b().size(); this.sentHistoryCursor = this.mc.ingameGUI.getChatGUI().func_73756_b().size();
this.inputField = new GuiTextField(this.fontRenderer, 4, this.height - 12, this.width - 4, 12); this.inputField = new GuiTextField(this.fontRenderer, 4, this.height - 12, this.width - 4, 12);
this.inputField.setMaxStringLength(100); this.inputField.setMaxStringLength(32767);
this.inputField.setEnableBackgroundDrawing(false); this.inputField.setEnableBackgroundDrawing(false);
this.inputField.setFocused(true); this.inputField.setFocused(true);
this.inputField.setText(this.defaultInputFieldText); this.inputField.setText(this.defaultInputFieldText);

@ -631,7 +631,7 @@ public class NetServerHandler extends NetHandler
{ {
String var2 = par1Packet3Chat.message; String var2 = par1Packet3Chat.message;
if (var2.length() > 100) if (var2.length() > 32767)
{ {
this.kickPlayerFromServer("Chat message too long"); this.kickPlayerFromServer("Chat message too long");
} }

Loading…
Cancel
Save