public RoundPlayers() { InitializeFinish += (sender, e) => { players = Players.Of(BotBits); roundsManager = RoundsManager.Of(BotBits); }; }
protected override void Initialize(BotBitsClient client, object args) { var settings = (Settings)args; RoundsManager.Of(client).MinimumPlayers = settings.MinimumPlayers; RoundsManager.Of(client).WaitTime = settings.WaitTime; RoundsManager.Of(client).FlyingPlayersCanPlay = settings.FlyingPlayersCanPlay; }
private void RemovePlayerFromRound(Player player) { player.RemoveFromRound(); if (Playing.Length < roundsManager.MinimumPlayers && roundsManager.Running || Potential.Length < roundsManager.MinimumPlayers && roundsManager.Starting) { RoundsManager.Of(BotBits).ForceStop(); } }
public Commands() { InitializeFinish += (sender, e) => { roundsManager = RoundsManager.Of(BotBits); if (!CommandsExtension.IsLoadedInto(BotBits)) { return; } CommandLoader.Of(BotBits).Load(this); requireModerator = PermissionsExtension.IsLoadedInto(BotBits); }; }