Skip to content

KcdMp.mock.message

Fires the page’s message handlers as if a client script or the game mode had sent a message.

Runs the handlers registered with KcdMp.onMessage with data, untouched.

KcdMp.mock.message(data)
Parameter Type
data unknown the message

nothing

KcdMp.onMessage((data) => showNotice(data.text));
KcdMp.mock.message({ text: "The gate is open." });

KcdMp.onMessage · KcdMp.mock.emit · the Mock mode group of the index