Added /f whoin
This commit is contained in:
parent
853bf88210
commit
71d95c3ad8
|
@ -623,6 +623,7 @@ factions.register_command("obliterate", {
|
|||
for _, f in pairs(factions.factions) do
|
||||
f:disband("obliterated")
|
||||
end
|
||||
return true
|
||||
end
|
||||
})
|
||||
|
||||
|
@ -643,6 +644,21 @@ factions.register_command("getspawn", {
|
|||
end
|
||||
})
|
||||
|
||||
factions.register_command("whoin", {
|
||||
description = "Get all members of a faction.",
|
||||
infaction = false,
|
||||
global_privileges = {"faction_admin"},
|
||||
format = {"faction"},
|
||||
on_success = function(player, faction, pos, parcelpos, args)
|
||||
local msg = {}
|
||||
for player, _ in pairs(args.factions[1].players) do
|
||||
table.insert(msg, player)
|
||||
end
|
||||
minetest.chat_send_player(player, table.concat(msg, ", "))
|
||||
return true
|
||||
end
|
||||
})
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
-- name: cmdhandler(playername,parameter)
|
||||
--
|
||||
|
|
Loading…
Reference in New Issue
Block a user