Skip to content

About

CMI-compatible interactive chat adapter ported for Folia and Paper 1.21.11

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

CyoriaInteractiveChat v0.1.5 (CMI-compatible)

A compact GPL-3.0-or-later CMI adapter for Folia/Paper 1.21.11, inspired by InteractiveChat. Credit and original idea: LoohpJames and InteractiveChat contributors. This adapter's implementation is newly written and does not bundle their classes.

Features

  • Native Paper AsyncChatEvent listener at HIGHEST (mutates the outgoing Adventure chat component without re-broadcasting messages)
  • [item]: rich hover data of the held ItemStack (Adventure ShowItem)
  • [inv]: clickable read-only main inventory snapshot, 27 main + 9 hotbar
  • [ender]: clickable read-only 27-slot ender chest
  • Preserves existing CMI chat formatting; does not create a second Minecraft or Discord message
  • No ProtocolLib, EssentialsX or additional download dependencies

Compatibility

  • Startup-tested on Folia 1.21.11 with CMI 9.8.8.4 and PacketEvents 2.13.0; interactive chat/GUI flow was verified on an isolated Leaf 1.21.11 Canary.
  • CMI wraps Paper chat as CMIComponentPaper and emits CMIAsyncChatEvent, but that wrapper is not the final Paper message sent to players.
  • v0.1.0 used reflection to modify CMI's wrapper component, which did not appear in outgoing chat. v0.1.1 modifies the original Paper event directly after CMI chat handling, avoiding reflective CMI internals.
  • Clickable tokens appear in Minecraft chat only. CrossParse is disabled, so DiscordSRV still forwards plain messages; this plugin does not generate Discord inventory images.
  • Chat snapshots are captured on the owning player's Folia entity scheduler. A global-region task expires snapshots after 5 minutes; view tokens are random 128-bit values and the inventory GUI is read-only.

Build

Run bash build.sh. Maven builds against Paper API and PacketEvents as provided dependencies and runs the inventory mapping check. Tags matching v*-folia.* publish an experimental prerelease JAR. The inline chat rewrite was also verified on an isolated Leaf 1.21.11 Canary with Mineflayer.

Deployment

Keep only this plugin (not upstream InteractiveChat). Copy the JAR into the server plugins/ directory, restart at a planned quiet time, inspect CMI and plugin startup logs, and test interactive messages for both Java and Bedrock clients. Never use PlugMan hot reload for chat plugins. Roll back by removing this JAR and restarting.

Licensing

GPL-3.0-or-later. See LICENSE. InteractiveChat is Copyright (C) LoohpJames and contributors; no original InteractiveChat source files are embedded. Modifications/reimplementations using copied InteractiveChat GPL source would also need to remain GPL.

v0.1.2 CMI clickable preview fallback

If a formatter strips click events from Paper chat, the plugin also listens for CMIAsyncChatEvent and sends a separate clickable Adventure preview line to the actual CMI message viewers for [inv] / [ender]. This avoids replacing CMI chat or sending duplicate Discord messages.

v0.1.3 CMI fallback

The clickable view link is now generated from Paper AsyncChatEvent.originalMessage() at MONITOR with ignoreCancelled=false, because CMI can replace [ender] with [Ender Chest] and suppress the earlier CMI custom-event listener. The original chat is not cancelled or rebroadcast. The clickable control is scoped to current Paper event viewer players, includes the author, and is sent on the main server thread.

v0.1.5 — inline CMI clickable inventory without an extra chat line

  • Replaces [inv] in the final CMI-formatted Minecraft system-chat component with [Click to view <player>'s Inventory] directly, preserving the prefix, rank, text colors and other chat interactions.
  • Replaces [ender] inline with [Click to view <player>'s Ender Chest] likewise.
  • Builds the read-only inventory snapshot with main-thread Bukkit access, using a token captured by PacketEvents on the client inbound chat packet before CMI formats and emits the outbound chat message.
  • Does not send an extra helper line. Does not change Minecraft to Discord messages; the GPL fork of LOOHP's official image renderer remains active.
  • Uses existing PacketEvents 2.13.0 and CMI dependencies. No ProtocolLib or CrossParse needed.
  • On the isolated Leaf 1.21.11 Canary, Mineflayer confirmed a single inline link with a run_command click event. A simulated click opened the 81-slot GUI window. [item] was not altered and CMI handled it as before.
  • Live deployment date: 2026-10-09; Minecraft restarted via MCSManager after save-all flush, with the old v0.1.3 preserved in backups/20261009-inline-v015/.

Rollback: stop Minecraft, replace the installed v0.1.5 JAR with the backed-up inactive-CyoriaInteractiveChat-0.1.3.jar under its original name, and restart Minecraft via MCSManager.

About

CMI-compatible interactive chat adapter ported for Folia and Paper 1.21.11

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages