From 9e7ec24c0e590e1cb36fba38b635f96164f7a97b Mon Sep 17 00:00:00 2001 From: AFCMS Date: Mon, 8 Mar 2021 17:45:25 +0100 Subject: [PATCH] add log --- mods/MISC/mcl_commands/init.lua | 5 +++-- mods/MISC/mcl_commands/title.lua | 6 +++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/mods/MISC/mcl_commands/init.lua b/mods/MISC/mcl_commands/init.lua index 7bf1b8cf0..5b504b17a 100644 --- a/mods/MISC/mcl_commands/init.lua +++ b/mods/MISC/mcl_commands/init.lua @@ -34,6 +34,7 @@ function mcl_commands.register_command(name, func, def) error("[mcl_commands] Failed to register command: ["..name.."] command already existing! Use mcl_commands.overide_command() if you want to overide existing command") end minetest.register_chatcommand(name, def) + minetest.log("action", "[mcl_commands] ["..name.."] command registered successfully") return cmd end @@ -46,6 +47,7 @@ function mcl_commands.overide_command(name, func, def) minetest.unregister_chatcommand(name) end minetest.register_chatcommand(name, def) + minetest.log("action", "[mcl_commands] ["..name.."] command overridden successfully") return cmd end @@ -79,6 +81,7 @@ function mcl_commands.build(func) params = {}, func = def.func, privs = def.privs or {} + desc = def.desc } -- End of param reached: add it to the pattern @@ -226,8 +229,6 @@ function mcl_commands.build(func) return cmd end - - dofile(modpath.."/kill.lua") dofile(modpath.."/setblock.lua") dofile(modpath.."/seed.lua") diff --git a/mods/MISC/mcl_commands/title.lua b/mods/MISC/mcl_commands/title.lua index 273568b8d..c06b8e52a 100644 --- a/mods/MISC/mcl_commands/title.lua +++ b/mods/MISC/mcl_commands/title.lua @@ -104,17 +104,17 @@ function mcl_title.reset(playername) end mcl_commands.register_command("title", function(cmd) - cmd:sub(":name:username title :text:json", { + cmd:sub(":name:username title :params:json", { func = function(name, target, json) return mcl_title.set(target, "title", json) end, }) - cmd:sub(":name:username subtitle :text:json", { + cmd:sub(":name:username subtitle :params:json", { func = function(name, target, json) return mcl_title.set(target, "subtitle", json) end, }) - cmd:sub(":name:username actionbar :text:json", { + cmd:sub(":name:username actionbar :params:json", { func = function(name, target, json) return mcl_title.set(target, "actionbar", json) end,