chat.lua 707 B

1234567891011121314151617181920
  1. ---@meta
  2. ---Chat
  3. -------
  4. ---@param text string
  5. function minetest.chat_send_all(text) end
  6. ---@param name string
  7. ---@param text string
  8. function minetest.chat_send_player(name, text) end
  9. ---Used by the server to format a chat message, based on the setting `chat_message_format`.
  10. ---Refer to the documentation of the setting for a list of valid placeholders.
  11. ---Takes player name and message, and returns the formatted string to be sent to players.
  12. ---Can be redefined by mods if required, for things like colored names or messages.
  13. ---**Only** the first occurrence of each placeholder will be replaced.
  14. ---@param name string
  15. ---@param message string
  16. function minetest.format_chat_message(name, message) end