public void BroadcastExcept(List <Player> blacklist, IGameRuleMessage message) { foreach (var plr in _players.Values.Where(x => !blacklist.Contains(x))) { plr.Session.SendAsync(message); } }
public void BroadcastExcept(Player blacklisted, IGameRuleMessage message) { foreach (var plr in _players.Values.Where(x => x != blacklisted)) { plr.Session.SendAsync(message); } }
public void Broadcast(IGameRuleMessage message) { foreach (var plr in _players.Values) { plr.Session.SendAsync(message); } }
public void Broadcast(IGameRuleMessage message) { foreach (var team in _teams.Values) { team.Broadcast(message); } }
public Task SendAsync(IGameRuleMessage message) { if (Disposed) { return(Task.CompletedTask); } return(Session?.SendAsync(message)); }