Skip to content

Adapt clickable chat components to new custom click\_event (Minecraft 1.21.6+) #3310

@BAD7777

Description

@BAD7777

Summary

Description:
Since Minecraft 1.21.6, Mojang changed how run_command click events behave:

  • Players now get a "Confirm Command Execution" window before executing commands via clickable chat or books.
Image
  • This makes old interactive chat features unusable (menus, clickable messages, etc.), since players need to confirm every click.

This was introduced in Snapshot 25w20a

Users will now be prompted for confirmation before executing a command from the run_command click action in books and chat if the command can't be parsed or requires elevated permissions.

Minecraft now provides a new alternative:

  • A new click_event type custom.
  • Instead of sending /command directly, the client sends a custom packet to the server when the text is clicked.
  • The plugin can then handle these events server-side without forcing command confirmation.

Docs:

Problem:
Currently ChatControl still uses run_command for clickable messages, which now triggers the confirmation dialog.

Expected behavior:
Adapt clickable components to use the new click_event: { action: "custom" }.

Proposed solution:

  • Add support for the custom click_event in ChatControl.
  • Allow plugin to define an ID and optional payload.
  • Handle these events internally and execute mapped commands or actions without showing the confirmation window.

Example JSON:

{
  "text": "Click me!",
  "clickEvent": {
    "action": "custom",
    "id": "chatcontrol:test",
    "payload": "open_menu"
  }
}

This way, ChatControl can keep clickable chat interactions working smoothly in 1.21.6+.


Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions