private void Add(Player player, IEnumerable <string> args) { if (!CheckPermission(player, "RaidBoss.Modify")) { return; } if (!CheckArgs(player, args)) { return; } var playerName = args.JoinToString(" "); var target = Server.GetPlayerByName(playerName); if (target == null) { player.SendError(GetMessage("No player", player)); return; } if (BossList.ContainsKey(target.Id)) { player.SendError(GetMessage("Already a boss", player)); return; } MakeBoss(target); }
private void RemoveBoss(Player player) { if (!BossList.ContainsKey(player.Id)) { return; } BossList.Remove(player.Id); PrintToChat(GetMessage("Boss removed")); CheckAllBossesAreGone(); }
private void OnPlayerDisconnected(Player player) { if (player == null) { return; } if (!BossList.ContainsKey(player.Id)) { return; } BossList.Remove(player.Id); PrintToChat(GetMessage("Boss left")); CheckAllBossesAreGone(); }