Skip to content

🐞 Discord chat-message webhook not triggered when using nChat #218

@trazodana

Description

@trazodana

Terms

  • I'm using the very latest version of zEssentials and its dependencies (zMenu and PlaceholdersAPI).
  • I am sure this is a bug and it is not caused by a misconfiguration or by another plugin.
  • I've looked for already existing issues on the Issue Tracker and haven't found any.
  • I already searched on the plugin wiki to know if a solution is already known.
  • I already searched on the discord to check if anyone already has a solution for this.
  • I tested this with just zEssentials and its dependencies and with a vanilla client of the same version as the Server.
  • I enabled the debug mode in config.yml and sql debug

Discord Username (optional)

trazodana

Server Version

1.21.4

Server Software

[17:09:53 INFO]: Checking version, please wait...
[17:09:53 INFO]: This server is running Leaf version 1.21.4-524-ver/1.21.4@8757c36 (2025-10-13T03:43:50Z) (Implementing API version 1.21.4-R0.1-SNAPSHOT)

  • You are running the latest version
    Previous: 1.21.4-2416-51aafbc (MC: 1.21.4)

zEssentials Version

[17:10:05 INFO]: zEssentials version 1.0.3.0
[17:10:05 INFO]: Provides an essential, core set of commands for Bukkit.
[17:10:05 INFO]: Website: https://groupez.dev/
[17:10:05 INFO]: Author: [Maxlego08]
[17:10:05 INFO]: Contributors: Louis_Dew, Traqueur, JavaToastDev, Melon-Oof, alwyn974, Mapacheee and NeiiZun

zMenu Version

[17:10:17 INFO]: zMenu version 1.1.0.7
[17:10:17 INFO]: Inventory management plugin
[17:10:17 INFO]: Website: https://groupez.dev/resources/zmenu.253
[17:10:17 INFO]: Author: Maxlego08
[17:10:17 INFO]: Contributors: mani1232, lijinhong11, Adreez, EnzoShoes, Noltox, saildrag, alwyn974 and 1robie

What happened?

Description

When using nChat as the chat system, messages sent by players in the global chat (including via the /g command) do not trigger the Discord chat-message webhook from zEssentials.

Root Cause

The Discord chat module in zEssentials listens only to the Paper event:

io.papermc.paper.event.player.AsyncChatEvent

(often with ignoreCancelled = true).

However, nChat replaces the default Paper chat pipeline and processes messages through its own API.
Public messages are handled via:

com.nickuc.chat.api.events.PublicMessageEvent

Because of this:

  • The original AsyncChatEvent is cancelled or bypassed
  • The zEssentials listener never receives the message
  • The Discord webhook is not triggered

Expected Behavior

Messages sent in the nChat global channel should also be forwarded to the chat-message Discord webhook.

Suggested Solution

  • To ensure compatibility with nChat (and other modern chat plugins), zEssentials should:
  • Listen to PublicMessageEvent from the nChat API
  • Filter public messages by channel name (e.g. global)
  • Forward event.getMessage() to the existing Discord chat-message logic

This would ensure support for:

/g command

nChat global chat

Custom chat pipelines that do not rely on AsyncChatEvent

Additional Notes

This is not a Discord webhook configuration issue

The webhook works correctly when using the default Paper chat

A small compatibility listener fully resolves the problem

Thanks for your time and for maintaining zEssentials!

Steps to reproduce the issue

  1. add nchat
  2. add zessentials
  3. add zmenu
  4. Enable module discord
  5. Enable chat-message
  6. No sucess.

Full Server Log

https://mclo.gs/Z2UIlkj

Error (optional)

Other files, you can drag and drop them here to upload. (optional)

No response

Screenshots/Videos (you can drag and drop files or paste links)

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions