forked from MineClone5/MineClone5
fix last command
This commit is contained in:
parent
d71e296602
commit
b1ab79b857
|
@ -9,23 +9,6 @@ dofile(modpath.."/setblock.lua")
|
||||||
dofile(modpath.."/seed.lua")
|
dofile(modpath.."/seed.lua")
|
||||||
dofile(modpath.."/summon.lua")
|
dofile(modpath.."/summon.lua")
|
||||||
dofile(modpath.."/say.lua")
|
dofile(modpath.."/say.lua")
|
||||||
|
dofile(modpath.."/list.lua")
|
||||||
|
|
||||||
dofile(modpath.."/alias.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
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
})
|
Loading…
Reference in New Issue