Subscribe with client.on(name, handler), client.once(name, handler), or client.waitFor(name, options).
client.on("OnChatRaw", ({ text }) => {
console.log(text);
});readyauthenticatedsessionChangedreconnectScheduledreconnectExhaustedopencloseerrorrawFrameSentrawFrameReceivedrawEnveloperawProtocolEventunknownProtocolEventparsingErrorOnWsCommandResponseOnMccCommandResponseOnWsConnectionCloseOnGameJoinedOnDisconnect
OnChatPrivateOnChatPublicOnTeleportRequestOnChatRawOnPlayerJoinOnPlayerLeave
OnChatPublic and OnChatPrivate use sender, not the old username field.
OnBlockBreakAnimationOnEntityAnimationOnPlayerPropertyOnServerTpsUpdateOnTimeUpdateOnEntityMoveOnEntitySpawnOnEntityDespawnOnHeldItemChangeOnHealthUpdateOnExplosionOnSetExperienceOnGamemodeUpdateOnLatencyUpdateOnMapDataOnTradeListOnTitleOnEntityEquipmentOnEntityEffectOnScoreboardObjectiveOnUpdateScoreOnInventoryUpdateOnInventoryOpenOnInventoryCloseOnDeathOnRespawnOnEntityHealthOnEntityMetadataOnPlayerStatusOnNetworkPacketOnInternalCommand
OnWsConnectionCloseis implemented from current MCC source and typed in the SDK.- In local
1.21.11-Vanillavalidation, player and server chat were consistently observed asOnChatRaw.OnChatPublicis still typed against the current MCC source contract, but it was not emitted in that offline local run. - Use
rawProtocolEventwhen investigating new or drifting MCC event behavior; it preserves the original envelope alongside the parsed payload.