Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

TextChatSendRule

TextChatSendRule = (world, sender) => boolean | string

A game’s rule for whether a player may send a message now: true to accept it, false to refuse it with the window’s own line, or the words the player’s window shows, such as “Chat opens when the match ends.”. The room refuses it game-rule, and it reaches no one and enters no history. The rule reads the world as the last step left it and the sender, never the message’s text, and writes nothing, not even to an entity. As React Hook Form’s validate, which returns true or the words to show.

Parameter Type
world World
sender PlayerEntity

boolean | string