description | A Minetest mod which provides a simple API to display messages at the center of the screen. |
owner | Wuzzy@disroot.org |
last change | Tue, 7 Apr 2020 12:31:59 +0000 (7 14:31 +0200) |
URL | git://repo.or.cz/minetest_central_message.git |
https://repo.or.cz/minetest_central_message.git | |
push URL | ssh://repo.or.cz/minetest_central_message.git |
https://repo.or.cz/minetest_central_message.git (learn more) | |
bundle info | minetest_central_message.git downloadable bundles |
content tags |
central_message
This Minetest mod allows other mods to display a short message at the center of the screen. Each message is displayed for a few seconds, then it is removed. When multiple messages are pushed quickly in succession, the messages will be “stacked” on the screen.
This mod adds the server command “cmsg” as well as an API for mods to display messages.
The syntax is “/cmsg <player> <text>
”. If <player>
is “*”, the message is sent to all players.
This mod can be useful to inform about all sorts of events and is an alternative to use the chat log to display special events.
Some usage examples:
This mod can be configured via minetest.conf
.
Currently, these settings are recognized:
central_message_max
: Limit the number of messages displayed at once, by providing a number. Use 0
for no limit. Default: 7
central_message_time
: How long (in seconds) a message is shown. Default: 5
central_message_color
: Set the message color of all messages. Value must be of format (R,G,B)
. Default: (255,255,255)
(white).cmsg.push_message_player(player, message)
Display a new message to one player only.
player
: An ObjectRef
to the player to which to send the messagemessage
: A string
containing the message to be displayed to the playerAlways nil
.
cmsg.push_message_all(message)
Display a new message to all connected players.
player
: An ObjectRef
to the player to which to send the messagemessage
: A string
containing the message to be displayed to all playersAlways nil
.
5 years ago | 0.3.0 | Version 0.3.0 | tag | commitlog |
4 years ago | master | logtree |
9 years ago | noworkaround | logtree |