1
0
mirror of https://github.com/Uberi/Minetest-WorldEdit.git synced 2025-06-28 06:12:00 +02:00

Introduce type parameter for worldedit.player_notify

This commit is contained in:
sfan5
2024-04-22 17:33:16 +02:00
parent d13ba673fe
commit 1d8d9a704f
12 changed files with 235 additions and 212 deletions

View File

@ -140,7 +140,7 @@ local function execute_worldedit_command(command_name, player_name, params)
assert(chatcmd, "unknown command: " .. command_name)
local _, msg = chatcmd.func(player_name, params)
if msg then
worldedit.player_notify(player_name, msg)
minetest.chat_send_player(player_name, msg)
end
end

View File

@ -264,7 +264,7 @@ worldedit.register_gui_handler("worldedit_gui", function(name, fields)
--ensure player has permission to perform action
local has_privs, missing_privs = minetest.check_player_privs(name, entry.privs)
if not has_privs then
worldedit.player_notify(name, "you are not allowed to use this function (missing privileges: " .. table.concat(missing_privs, ", ") .. ")")
worldedit.player_notify(name, "you are not allowed to use this function (missing privileges: " .. table.concat(missing_privs, ", ") .. ")", "error")
return false
end
if entry.on_select then