internal AllPlayersNode(string JSON) : base(JSON) { foreach (JToken jt in _Data.Children()) { PlayerNode pn = new PlayerNode(jt.First.ToString()); pn._SteamID = jt.Value <JProperty>()?.Name ?? ""; _Players.Add(pn); } }
internal AllPlayersNode(string JSON) : base(JSON) { foreach (JToken jt in _Data.Children()) { PlayerNode pn = new PlayerNode(jt.First.ToString()); pn._SteamID = jt.Value<JProperty>()?.Name ?? ""; _Players.Add(pn); } }
public PlayerNode GetBySteamID(string SteamID) { PlayerNode pn = _Players.Find(x => x.SteamID == SteamID); if (pn != null) { return(pn); } return(new PlayerNode("")); }
public PlayerNode GetByName(string Name) { PlayerNode pn = _Players.Find(x => x.Name == Name); if (pn != null) { return(pn); } return(new PlayerNode("")); }