mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-14 15:03:44 +01:00
14 lines
377 B
Lua
14 lines
377 B
Lua
|
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
|
||
|
})
|