minetest.register_on_chat_message

From Minetest Developer Wiki
Jump to: navigation, search

Syntax

minetest.register_on_chat_message(function(name, message))

Description

Called always when a player says something.

Example

minetest.register_on_chat_message(function(name, message)
	if name == "singleplayer"
	and message == "please grant me everything" then
		minetest.set_player_privs(name, minetest.registered_privileges)
		minetest.chat_send_player(name, "<thisguy> ok")
	end
end)
Personal tools
Namespaces

Variants
Actions
Navigation
API
Toolbox