yl_scheduler/chatcommand_scheduler_remove.lua
2024-04-09 17:21:44 +02:00

23 lines
759 B
Lua

local chatcommand_cmd = "scheduler_remove"
local chatcommand_params = "<UUID>"
local chatcommand_description =
"Removes the given UUID from the task list. See /" .. chatcommand_cmd ..
" help"
local chatcommand_definition = {
params = chatcommand_params,
description = chatcommand_description,
privs = yl_scheduler.get_privs(chatcommand_cmd),
func = function(name, params)
local success, message = yl_scheduler["cmd_" .. chatcommand_cmd](name,
params)
if success then
return true, message
else
return false, message
end
end
}
minetest.register_chatcommand(chatcommand_cmd, chatcommand_definition)