public void Remove(BasePlayer oldOutlaw) { Outlaw itemToRemove = outlaws.SingleOrDefault(o => o.Player == oldOutlaw); if (itemToRemove != null) { outlaws.Remove(itemToRemove); } }
public bool TryResolveByPartialName(string partialName, out Outlaw matchingOutlaw) { matchingOutlaw = outlaws.SingleOrDefault(o => o.Player.displayName.IndexOf(partialName, StringComparison.InvariantCultureIgnoreCase) != -1); return(matchingOutlaw != null); }
public bool TryResovleByPlayer(BasePlayer player, out Outlaw matchingOutlaw) { matchingOutlaw = outlaws.SingleOrDefault(o => o.Player == player); return(matchingOutlaw != null); }