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); }
public bool HasMember(string userId) { return(MemberIds.Contains(userId)); }