0
0
Fork 0

fix last command

This commit is contained in:
AFCMS 2021-03-05 10:22:52 +01:00
parent d71e296602
commit b1ab79b857
2 changed files with 16 additions and 19 deletions

View File

@ -9,23 +9,6 @@ dofile(modpath.."/setblock.lua")
dofile(modpath.."/seed.lua")
dofile(modpath.."/summon.lua")
dofile(modpath.."/say.lua")
dofile(modpath.."/list.lua")
dofile(modpath.."/alias.lua")
minetest.register_chatcommand("list", {
description = S("Show who is logged on"),
params = "",
privs = {},
func = function(name)
local players = ""
for _, player in ipairs(minetest.get_connected_players()) do
players = players..player:get_player_name().."\n"
end
minetest.chat_send_player(name, players)
end
})
dofile(modpath.."/alias.lua")

View File

@ -0,0 +1,14 @@
local S = minetest.get_translator("mcl_commands")
minetest.register_chatcommand("list", {
description = S("Show who is logged on"),
params = "",
privs = {},
func = function(name)
local players = ""
for _, player in ipairs(minetest.get_connected_players()) do
players = players..player:get_player_name().."\n"
end
minetest.chat_send_player(name, players)
end
})