Chat¶
Get controls of the chat.
-
class
miney.
Chat
(mt: miney.minetest.Minetest)[source]¶ Chat functions.
-
send_to_all
(message: str) → None[source]¶ Send a chat message to all connected players.
- Parameters
message – The chat message
- Returns
None
-
send_to_player
(player: Union[str, miney.player.Player], message: str) → None[source]¶ Send a message to a player.
- Send “Hello” to the first player on the server
>>> mt.chat.send_to_player(mt.player[0], "Hello")
- Send “Hello” to the player “Miney” on the server
>>> mt.chat.send_to_player("Miney", "Hello")
- Parameters
player – A Player object or a string with the name.
message – The message
- Returns
None
-