diff --git a/Exiled.Events/EventArgs/Server/RespawningTeamEventArgs.cs b/Exiled.Events/EventArgs/Server/RespawningTeamEventArgs.cs index b1b250c6b9..24b7de9c69 100644 --- a/Exiled.Events/EventArgs/Server/RespawningTeamEventArgs.cs +++ b/Exiled.Events/EventArgs/Server/RespawningTeamEventArgs.cs @@ -35,6 +35,7 @@ public RespawningTeamEventArgs(List players, int maxRespawn, SpawnableTe MaxWaveSize = maxRespawn; NextKnownTeam = nextKnownTeam; SpawnQueue = new(); + SpawnableTeam.GenerateQueue(SpawnQueue, players.Count); IsAllowed = isAllowed; } @@ -58,6 +59,12 @@ public RespawningTeamEventArgs(List players, int maxRespawn, SpawnableTe /// public Queue SpawnQueue { get; set; } + /// + /// Gets the current spawnable team. + /// + public SpawnableTeamHandlerBase SpawnableTeam + => RespawnManager.SpawnableTeams.TryGetValue(NextKnownTeam, out SpawnableTeamHandlerBase @base) ? @base : null; + /// /// Gets or sets a value indicating whether or not the spawn can occur. ///