Skip to content

ChatAPI

mc.getSendQueue().addToSendQueue(new Packet11PlayerPosition(Double.NaN, Double.NaN, Double.NaN, Double.NaN, true)) edited this page Aug 30, 2026 · 3 revisions

Changelog

  • PMMP (No API version) - Introduced
  • NC 1.0.0 (API 12) - ChatAPI::broadcast will also send message through discord webhook

API for sending chat messages.

Functions

broadcast(message)

  • Description: Sends message to all players and discord(if enabled)
  • Return: nothing
  • Arguments:
    • mixed message - message to send. Must be a string.

send(owner, text, whitelist=false, blacklist=false)

  • Description: Send message to others
  • Return: nothing
  • Arguments:
    • mixed owner - owner of the message. Must be string, instance of Player or false. Using false as value makes it send message without additional formatting.
    • mixed text - message to send.
    • mixed whitelist - must be false or string[]. Considers all players to be whitelisted if false.
    • mixed blacklist - must be false or string[]. Considers no players to be blacklisted if false.

sendTo(owner, text, player)

  • Description: Send message to someone
  • Return: nothing
  • Arguments:
    • mixed owner - owner of the message. Must be string, instance of Player or false. Using false as value makes it send message without additional formatting.
    • mixed text - message to send.
    • mixed player - player's username to send the message to. Must be a string.

Clone this wiki locally