Addind an error message when a player use teleport without right.

This commit is contained in:
LeMagnesium 2014-10-05 17:35:10 +02:00
parent e5b4748bb4
commit 7d41f7c5ce
1 changed files with 5 additions and 2 deletions

View File

@ -364,8 +364,11 @@ core.register_chatcommand("teleport", {
.. " to " .. target_name
.. " at " .. core.pos_to_string(p)
end
end
else
minetest.chat_send_player(name, "You cannot teleport any other player (missing privilege : bring).", true)
return false
end
return false, 'Invalid parameters ("' .. param
.. '") or player not found (see /help teleport)'
end,