Example #1
0
 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);
     }
 }
Example #2
0
 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);
     }
 }
Example #3
0
        public PlayerNode GetBySteamID(string SteamID)
        {
            PlayerNode pn = _Players.Find(x => x.SteamID == SteamID);

            if (pn != null)
            {
                return(pn);
            }

            return(new PlayerNode(""));
        }
Example #4
0
        public PlayerNode GetByName(string Name)
        {
            PlayerNode pn = _Players.Find(x => x.Name == Name);

            if (pn != null)
            {
                return(pn);
            }

            return(new PlayerNode(""));
        }