Minecraft 1.11: Raise chat message max length to 256

This commit is contained in:
ORelio 2016-11-19 16:06:08 +01:00
parent 8ec2b2e570
commit 609b939159
4 changed files with 30 additions and 6 deletions

View file

@ -21,6 +21,7 @@ namespace MinecraftClient.Protocol.Handlers
private const int MC19Version = 107;
private const int MC191Version = 108;
private const int MC110Version = 210;
private const int MC111Version = 315;
private int compression_treshold = 0;
private bool autocomplete_received = false;
@ -1411,6 +1412,17 @@ namespace MinecraftClient.Protocol.Handlers
}
}
/// <summary>
/// Get max length for chat messages
/// </summary>
/// <returns>Max length, in characters</returns>
public int GetMaxChatMessageLength()
{
return protocolversion >= MC111Version
? 256
: 100;
}
/// <summary>
/// Send a chat message to the server
/// </summary>