fix /list command not beeing mc like

This commit is contained in:
AFCMS 2021-04-06 13:02:04 +02:00
parent 8eebdd3461
commit 16529330dd
6 changed files with 11 additions and 4 deletions

View File

@ -4,11 +4,13 @@ mcl_commands.register_command("list", {
func = function(cmd)
cmd:sub("", {
func = function(name)
local players = ""
for _, player in ipairs(minetest.get_connected_players()) do
players = players..player:get_player_name().."\n"
local player_list = minetest.get_connected_players()
local header = S("There are @1/@2 players online:", #player_list, minetest.settings:get("max_users") or "unknown").."\n"
local players = {}
for _, player in ipairs(player_list) do
table.insert(players, player:get_player_name())
end
return true, players
return true, header..table.concat(players, ", ")
end,
privs = {},
})

View File

@ -18,6 +18,7 @@ Invalid node=Unültiger Node
Invalid parameters (see /help setblock)=Ungültige Parameter (siehe „/help setblock”)
List bans=Bannliste anzeigen
Ban list: @1=Bannliste: @1
There are @1/@2 players online:=
Show who is logged on=Anzeigen, wer eingeloggt ist
Displays the world seed=Den Seed der Welt anzeigen
Only peaceful mobs allowed!=Nur friedliche Mobs erlaubt!

View File

@ -18,6 +18,7 @@ Invalid node=Nodo no válido
Invalid parameters (see /help setblock)=Parámetros no válidos (Revisa el comando "/help setblock")
List bans=Lista de prohibiciones
Ban list: @1=Lista de baneados: @1
There are @1/@2 players online:=
Show who is logged on=Mostrar quién ha iniciado sesión
Displays the world seed=Muestra la semilla del mundo
Only peaceful mobs allowed!=¡Solo se permiten animales pacíficos!

View File

@ -18,6 +18,7 @@ Invalid node=Noeud non valide
Invalid parameters (see /help setblock)=Paramètres invalides (voir /help setblock)
List bans=Liste des interdictions
Ban list: @1=Liste d'interdiction: @1
There are @1/@2 players online:=Il y a @1/@2 joueurs en ligne:
Show who is logged on=Afficher qui est connecté
Displays the world seed=Affiche la graine du monde
Only peaceful mobs allowed!=Seuls les mobs pacifiques sont autorisées!

View File

@ -18,6 +18,7 @@ Invalid node=Неправильный узел
Invalid parameters (see /help setblock)=Недопустимые параметры (см. /help setblock)
List bans=Список банов
Ban list: @1=Бан-лист: @1
There are @1/@2 players online:=
Show who is logged on=Показывает, кто подключён
Displays the world seed=Показывает значение зерна мира (seed)
Only peaceful mobs allowed!=Включены только мирные мобы!

View File

@ -18,6 +18,7 @@ Invalid node=
Invalid parameters (see /help setblock)=
List bans=
Ban list: @1=
There are @1/@2 players online:=
Show who is logged on=
Displays the world seed=
Only peaceful mobs allowed!=