diff --git a/TShockAPI/Utils.cs b/TShockAPI/Utils.cs index a4884856..873b2ee7 100644 --- a/TShockAPI/Utils.cs +++ b/TShockAPI/Utils.cs @@ -63,28 +63,6 @@ namespace TShockAPI return mess.Split(':')[0]; } - /// - /// Used for some places where a list of players might be used. - /// - /// String of players seperated by commas. - [Obsolete("Use GetPlayers and manually create strings. This should never have been kept as far as actual functions go.")] - public string GetPlayers() - { - var sb = new StringBuilder(); - foreach (TSPlayer player in TShock.Players) - { - if (player != null && player.Active) - { - if (sb.Length != 0) - { - sb.Append(", "); - } - sb.Append(player.Name); - } - } - return sb.ToString(); - } - /// /// Returns a list of current players on the server /// @@ -112,30 +90,6 @@ namespace TShockAPI return players; } - /// - /// Used for some places where a list of players might be used. - /// - /// String of players and their id seperated by commas. - [Obsolete("Use GetPlayers and manually create strings. This should never have been kept as far as actual functions go.")] - public string GetPlayersWithIds() - { - var sb = new StringBuilder(); - foreach (TSPlayer player in TShock.Players) - { - if (player != null && player.Active) - { - if (sb.Length != 0) - { - sb.Append(", "); - } - sb.Append(player.Name); - string id = "(ID: " + Convert.ToString(TShock.Users.GetUserID(player.UserAccountName)) + ", IX:" + player.Index + ")"; - sb.Append(id); - } - } - return sb.ToString(); - } - /// /// Finds a player and gets IP as string /// @@ -697,7 +651,7 @@ namespace TShockAPI } foo = foo.Replace("%map%", Main.worldName); - foo = foo.Replace("%players%", GetPlayers()); + foo = foo.Replace("%players%", String.Join(",", GetPlayers(false))); Regex reg = new Regex("%\\s*(?\\d{1,3})\\s*,\\s*(?\\d{1,3})\\s*,\\s*(?\\d{1,3})\\s*%"); var matches = reg.Matches(foo); Color c = Color.White;