Skip to content

feat: Add configurable MaxChatMessageLength for older protocol versions#2979

Merged
milutinke merged 2 commits intomasterfrom
copilot/add-longer-chat-support-old-versions
Mar 24, 2026
Merged

feat: Add configurable MaxChatMessageLength for older protocol versions#2979
milutinke merged 2 commits intomasterfrom
copilot/add-longer-chat-support-old-versions

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 24, 2026

  • Analyze codebase: understand GetMaxChatMessageLength() in Protocol16/18 handlers, Settings patterns, ConfigComments patterns
  • Add MaxChatMessageLength config option to Settings.cs under AdvancedConfig (default: 0 = auto-detect)
  • Add validation in OnSettingUpdate() to clamp the value (0-32767) and warn about potential kicks
  • Update Protocol18Handler.GetMaxChatMessageLength() to check the config override
  • Update Protocol16Handler.GetMaxChatMessageLength() to check the config override
  • Add config comment in ConfigComments.resx and ConfigComments.Designer.cs
  • Build and verify the changes compile (0 errors, only pre-existing warnings)
  • Run code review (no issues found)
  • Run CodeQL security scan (no alerts)
  • Decompile MC 1.8 server, modify chat limit from 100 to 256, recompile
  • Integration test: MCC with MaxChatMessageLength=256 on modified 1.8 server
    • 101-char message sent and echoed back (exceeds vanilla 100 limit)
    • 200-char message sent and echoed back
    • 256-char message sent and echoed back (at max configured limit)
    • Server logs confirm all messages received at full length
    • Screenshot evidence captured

Integration Test Evidence

Integration Test Evidence

Original prompt

This section details on the original issue you should resolve

<issue_title>[Idea] Add Longer Chat Support for old versions</issue_title>
<issue_description>### Prerequisites

Console Client Version

Latest

Describe your problem

Currently, In old versions like 1.8.9, the chat message limit is 100 characters. But hypixel supports up to 256 characters.
I suggest adding a configurable option to set the maximum message length to 256.
This would make users can send a long chat in hypixel.

Suggest a possible solution

No response

Attach screenshot here (If applicable)

No response

Minecraft Version

1.8.9

Device

None

Operating System

None</issue_description>

<agent_instructions>Please create a configuration variable that allows for forcing a different maximum chat size on version 1.8 - 1.8.9, but add a warning that this may cause kicking from the server if set incorrectly.

Use the development workflow skill, end-to-end testing skill.
De-compile a 1.8 server, change the max chat size, compile it and then test the change in the mcc. Decompilation instructions are in one of the skills.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

…older versions

Adds a MaxChatMessageLength config option under [Main.Advanced] that allows
users to override the protocol-defined maximum chat message length. Default is
0 (auto: 100 for MC 1.10 and below, 256 for MC 1.11+). Some servers like
Hypixel support longer messages on older versions, so this lets users set a
custom limit (e.g. 256 on 1.8.9). Includes a warning about potential kicks
if set incorrectly.

Closes #2947

Co-authored-by: milutinke <441903+milutinke@users.noreply.github.com>
Agent-Logs-Url: https://github.com/MCCTeam/Minecraft-Console-Client/sessions/39c78e6a-f748-4f41-a905-2f5d27f99eff
Copilot AI changed the title [WIP] Add configurable option for longer chat messages in old versions Add configurable MaxChatMessageLength for older protocol versions Mar 24, 2026
Copilot AI requested a review from milutinke March 24, 2026 18:51
@milutinke milutinke marked this pull request as ready for review March 24, 2026 19:17
@milutinke milutinke changed the title Add configurable MaxChatMessageLength for older protocol versions feat: Add configurable MaxChatMessageLength for older protocol versions Mar 24, 2026
@milutinke milutinke merged commit 4d851b6 into master Mar 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Idea] Add Longer Chat Support for old versions

2 participants