From 1d33c3fd4cbd1586db69d93ac136f856eb416ba4 Mon Sep 17 00:00:00 2001 From: GrafDimenzio Date: Sat, 18 Jul 2020 18:58:05 +0200 Subject: [PATCH] added GetAllPlayers(this Team[] roles) --- Synapse/Api/Extensions.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Synapse/Api/Extensions.cs b/Synapse/Api/Extensions.cs index 5b6f5d8..58c4bbf 100644 --- a/Synapse/Api/Extensions.cs +++ b/Synapse/Api/Extensions.cs @@ -61,6 +61,8 @@ public static void RaMessage(this CommandSender sender, string message, bool suc public static IEnumerable GetAllPlayers(this RoleType[] roles) => Player.GetAllPlayers().Where(x => roles.Any(r => x.Role == r)); + public static IEnumerable GetAllPlayers(this Team[] roles) => Player.GetAllPlayers().Where(x => roles.Any(t => x.Team == t)); + /// /// Gives all players on the server in this Team ///