1
0
Fork 0
chat-command-builder-2
AFCMS 2021-06-24 23:45:47 +02:00
parent 658028e90a
commit cc0ed855a9
2 changed files with 4 additions and 2 deletions

View File

@ -103,7 +103,7 @@ end
function mcl_commands.register_basic_command(name, def) function mcl_commands.register_basic_command(name, def)
local func local func
if def.params then if def.params then
local funcparams = local funcparams = ""
return return
else else
mcl_commands.registered_commands[name] = {type = "basic", description = def.desc, privs = def.privs} mcl_commands.registered_commands[name] = {type = "basic", description = def.desc, privs = def.privs}

View File

@ -1,10 +1,12 @@
local S = minetest.get_translator(minetest.get_current_modname()) local S = minetest.get_translator(minetest.get_current_modname())
local seed = minetest.get_mapgen_setting("seed")
minetest.register_chatcommand("seed", { minetest.register_chatcommand("seed", {
description = S("Displays the world seed"), description = S("Displays the world seed"),
params = "", params = "",
privs = {}, privs = {},
func = function(name) func = function(name)
minetest.chat_send_player(name, "Seed: "..minetest.get_mapgen_setting("seed")) minetest.chat_send_player(name, "Seed: "..seed)
end end
}) })