
StaffChat
A private chat channel for your server's staff team.
Список изменений
[1.0.2] — 2026-04-16
Fixed
-
Staff messages STILL leaked through DCIntegration after 1.0.1. Reported by SYLX again. Disassembling
dcintegration-fabric-3.0.7.2-1.21.jarrevealed the actual hook:de.erdbeerbaerlp.dcintegration.fabric.mixin.ChatMixinuses@Redirectto wrap thePlayerManager.broadcast(SignedMessage, …)call insideServerPlayNetworkHandler.handleDecoratedMessage(). At the bytecode level, the broadcast invocation is REPLACED by their handler — which forwards the message to Discord and (typically) calls broadcast itself. The 1.0.1 phase-ordering fix was useless here because Fabric'sALLOW_CHAT_MESSAGEevent fires INSIDEPlayerManager.broadcast, which means by the time the event would fire, DCIntegration had already POSTed to Discord.The real fix is a Mixin of our own:
ServerPlayNetworkHandlerMixininjects at HEAD ofhandleDecoratedMessagewithcancellable = true. This runs BEFORE the method body (and therefore before any@Redirecton calls inside the body). When we cancel, the entire body is skipped — DCIntegration's@Redirectnever fires, the broadcast call never happens, no Discord post.Only staff-chat traffic is intercepted (toggle mode +
@quick-prefix). Regular global chat passes through unchanged so DCIntegration continues to mirror it normally.
Notes for server operators
- Drop the new jar in
mods/and restart. No config changes. - The 1.0.1 phase-ordered listener is left in place as a fallback for
servers running chat-bridge mods that DON'T use Mixins (the listener
- the mixin can both fire safely; whichever runs first cancels the message).
- This fix is robust against any chat-bridge mod that hooks at or
below
PlayerManager.broadcast(the most common pattern). A bridge that hooksServerPlayNetworkHandler.handleChatMessage(the much earlier entry point, before signature decoration) would still see the message — that's a much more invasive integration and isn't the case for DCIntegration / Styled Chat / simple-discord-bridge / any mainstream Fabric chat bridge I've seen.
