Exemplo n.º 1
0
            public bool Demote(User user)
            {
                if (!MemberIds.Contains(user.Id))
                {
                    throw new InvalidOperationException($"Cannot demote player {user.Id} in faction {Id}, since they are not a member");
                }

                if (!ManagerIds.Remove(user.Id))
                {
                    return(false);
                }

                Api.OnPlayerDemoted(this, user);
                return(true);
            }
Exemplo n.º 2
0
 public bool HasMember(string userId)
 {
     return(MemberIds.Contains(userId));
 }