Check for player for /me
This commit is contained in:
parent
ddee2ed0cf
commit
ee38202cbc
@ -167,13 +167,15 @@ minetest.register_on_chat_message(function(name, message)
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
minetest.register_chatcommand("me", {
|
minetest.register_chatcommand("me", {
|
||||||
params = "<action>",
|
params = "<action>",
|
||||||
description = "Perform an action for nearby players.",
|
description = "Perform an action for nearby players.",
|
||||||
privs = {shout = true},
|
privs = {shout = true},
|
||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
local shouter = minetest.get_player_by_name(name)
|
local shouter = minetest.get_player_by_name(name)
|
||||||
|
if not shouter then
|
||||||
|
return
|
||||||
|
end
|
||||||
local spos = shouter:getpos()
|
local spos = shouter:getpos()
|
||||||
|
|
||||||
-- Minetest library (modified)
|
-- Minetest library (modified)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user