Chat

The chat. The server can send messages and decide whether ordinary messages go to everyone automatically. A client can write as its player and show or hide the chat window.

chat.sendToAll()

Chat.sendToAll(text, options)

Sends a message to all players.

chat.sendToPlayer()

Chat.sendToPlayer(player, text, options)

Sends a message to one player. Nothing happens if they have left.

chat.setChatRelay()

Chat.setChatRelay(value)

Turns the default relay on or off. When on, the default, each ordinary message goes to all players before playerChat fires. Turn it off to route chat yourself, for local chat, channels or mutes. Commands, which start with /, are never relayed.

chat.relaysChat()

Chat.relaysChat()

Whether the default relay is on.

chat.send()

Chat.send(text)

Sends a message as the local player, as if typed. Text starting with / is a command.

chat.setUIVisible()

Chat.setUIVisible(visible)

Shows or hides the chat window in this game.

chat.isUIVisible()

Chat.isUIVisible()

Whether the chat window shows.

chat.open()

Chat.open()

Opens the chat input, like the player's chat key.

chat.close()

Chat.close()

Closes the chat input.

chat.isOpen()

Chat.isOpen()

Whether the chat input is open.