From eac314c1b77f86c3723a6ad9a0047eb436b96842 Mon Sep 17 00:00:00 2001 From: Kevin Mok Date: Fri, 26 Jul 2019 22:18:46 -0400 Subject: [PATCH] Initial commit --- init.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 init.lua diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..0367b40 --- /dev/null +++ b/init.lua @@ -0,0 +1,20 @@ +-- https://github.com/Uberi/Minetest-WorldEdit/blob/master/worldedit_shortcommands/init.lua +function alias(short, orig) + if not minetest.chatcommands[orig] then + minetest.log("error", "custom_aliases: original command " .. orig .. " does not exist") + return true + end + if minetest.chatcommands[short] then + minetest.log("error", "custom_aliases: alias " .. short .. " already exists") + return true + end + minetest.register_chatcommand(short, minetest.chatcommands[orig]) + return false +end + +alias("gim", "giveme") +alias("grm", "grantme") +-- needs to be in minetest game? +-- alias("h", "home") +alias("sd", "shutdown") +alias("t", "teleport")