TShockAPI.DB.Region.SetAllowedIDs C# (CSharp) Method

SetAllowedIDs() public method

Sets the user IDs which are allowed to use the region
public SetAllowedIDs ( String ids ) : void
ids String String of IDs to set
return void
        public void SetAllowedIDs(String ids)
        {
            String[] idArr = ids.Split(',');
            List<int> idList = new List<int>();

            foreach (String id in idArr)
            {
                int i = 0;
                if (int.TryParse(id, out i) && i != 0)
                {
                    idList.Add(i);
                }
            }
            AllowedIDs = idList;
        }