From 480e3f522ba4a69a8b69ecc08460f2ac8e45e3e9 Mon Sep 17 00:00:00 2001 From: ArdaKaramanx Date: Thu, 26 Mar 2026 15:10:04 +0300 Subject: [PATCH 1/5] Respawn.cs Updated PauseWaves(); Added ClaerWaves(); Renamed --- EXILED/Exiled.API/Features/Respawn.cs | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/EXILED/Exiled.API/Features/Respawn.cs b/EXILED/Exiled.API/Features/Respawn.cs index 0f34495520..5e35f609c2 100644 --- a/EXILED/Exiled.API/Features/Respawn.cs +++ b/EXILED/Exiled.API/Features/Respawn.cs @@ -409,16 +409,36 @@ public static void PauseWave(SpawnableFaction spawnableFaction) } /// - /// Pauses respawn waves by removing them from WaveManager.Waves and storing them in . + /// Clears all active respawn waves from + /// and stores them in for later restoration. /// - /// - public static void PauseWaves() + /// + /// This completely removes waves from the active wave list. + /// + public static void ClaerWaves() { PausedWaves.Clear(); PausedWaves.AddRange(WaveManager.Waves); WaveManager.Waves.Clear(); } + /// + /// Temporarily pauses all time-based respawn waves by forcefully stopping their timers. + /// + /// + /// Unlike ClearWaves, this does not remove waves, it only stops their progression. + /// + public static void PauseWaves() + { + foreach (SpawnableWaveBase wave in WaveManager.Waves) + { + if (wave is TimeBasedWave timeBasedWave) + { + timeBasedWave.Timer.IsForcefullyPaused = true; + } + } + } + /// /// Pauses the specified list of respawn waves by iterating through each wave /// and pausing it using the method. From 8c755190e9d08bc20d4a789014e25fd0edda3608 Mon Sep 17 00:00:00 2001 From: ArdaKaramanx Date: Thu, 26 Mar 2026 15:19:09 +0300 Subject: [PATCH 2/5] PauseWaves renamed And add paramiter isForcePause --- EXILED/Exiled.API/Features/Respawn.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/EXILED/Exiled.API/Features/Respawn.cs b/EXILED/Exiled.API/Features/Respawn.cs index 5e35f609c2..1669ac6169 100644 --- a/EXILED/Exiled.API/Features/Respawn.cs +++ b/EXILED/Exiled.API/Features/Respawn.cs @@ -423,18 +423,21 @@ public static void ClaerWaves() } /// - /// Temporarily pauses all time-based respawn waves by forcefully stopping their timers. + /// Forcefully pauses or resumes all time-based respawn waves by controlling their timers. /// + /// + /// If true, all time-based waves will be paused. If false, their timers will resume. + /// /// - /// Unlike ClearWaves, this does not remove waves, it only stops their progression. + /// Unlike ClearWaves, this does not remove waves from the system, it only controls their timer state. /// - public static void PauseWaves() + public static void ForcePauseWaves(bool isForcePause = true) { foreach (SpawnableWaveBase wave in WaveManager.Waves) { if (wave is TimeBasedWave timeBasedWave) { - timeBasedWave.Timer.IsForcefullyPaused = true; + timeBasedWave.Timer.IsForcefullyPaused = isForcePause; } } } From 4ff9cd8d11020ebfb6364b6943e371b484d51919 Mon Sep 17 00:00:00 2001 From: "J.E.A.K" <68794752+ArdaKaramanx@users.noreply.github.com> Date: Fri, 27 Mar 2026 02:29:31 +0300 Subject: [PATCH 3/5] Update EXILED/Exiled.API/Features/Respawn.cs Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> --- EXILED/Exiled.API/Features/Respawn.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EXILED/Exiled.API/Features/Respawn.cs b/EXILED/Exiled.API/Features/Respawn.cs index 1669ac6169..93639fed0a 100644 --- a/EXILED/Exiled.API/Features/Respawn.cs +++ b/EXILED/Exiled.API/Features/Respawn.cs @@ -431,7 +431,7 @@ public static void ClaerWaves() /// /// Unlike ClearWaves, this does not remove waves from the system, it only controls their timer state. /// - public static void ForcePauseWaves(bool isForcePause = true) + public static void PauseWaves(bool isForcePause = true) { foreach (SpawnableWaveBase wave in WaveManager.Waves) { From 3720de9dfbd8563af44e0f245a4ee5502a02be58 Mon Sep 17 00:00:00 2001 From: "J.E.A.K" <68794752+ArdaKaramanx@users.noreply.github.com> Date: Fri, 27 Mar 2026 02:29:43 +0300 Subject: [PATCH 4/5] Update EXILED/Exiled.API/Features/Respawn.cs Co-authored-by: Yamato <66829532+louis1706@users.noreply.github.com> --- EXILED/Exiled.API/Features/Respawn.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EXILED/Exiled.API/Features/Respawn.cs b/EXILED/Exiled.API/Features/Respawn.cs index 93639fed0a..8b07d53aa0 100644 --- a/EXILED/Exiled.API/Features/Respawn.cs +++ b/EXILED/Exiled.API/Features/Respawn.cs @@ -409,7 +409,7 @@ public static void PauseWave(SpawnableFaction spawnableFaction) } /// - /// Clears all active respawn waves from + /// Clears all active respawn waves from . /// and stores them in for later restoration. /// /// From bbf5e239ee94d8ca5d0c15a491f5d141016943d4 Mon Sep 17 00:00:00 2001 From: ArdaKaramanx Date: Fri, 27 Mar 2026 11:36:06 +0300 Subject: [PATCH 5/5] Update Respawn.cs ClaerWaves() Name fix ClearWaves() PauseWave(SpawnableFaction,bool) Add ClearWave(SpawnableFaction) renamed --- EXILED/Exiled.API/Features/Respawn.cs | 79 +++++++++++++++++++-------- 1 file changed, 55 insertions(+), 24 deletions(-) diff --git a/EXILED/Exiled.API/Features/Respawn.cs b/EXILED/Exiled.API/Features/Respawn.cs index 8b07d53aa0..4ef4de7e77 100644 --- a/EXILED/Exiled.API/Features/Respawn.cs +++ b/EXILED/Exiled.API/Features/Respawn.cs @@ -389,39 +389,21 @@ public static void ForceWave(SpawnableWaveBase spawnableWaveBase) } /// - /// Pauses a specific respawn wave by removing it from the active wave list and adding it to the paused wave list. + /// Forcefully pauses or resumes the timer of a time-based respawn wave for the specified faction. /// - /// The representing the wave to pause. - public static void PauseWave(SpawnableFaction spawnableFaction) + /// The faction associated with the respawn wave. + /// True to pause the wave timer, false to resume it. + public static void PauseWave(SpawnableFaction spawnableFaction, bool isForcePause = true) { if (TryGetWaveBase(spawnableFaction, out SpawnableWaveBase spawnableWaveBase)) { - if (!PausedWaves.Contains(spawnableWaveBase)) + if (spawnableWaveBase is TimeBasedWave timeBasedWave) { - PausedWaves.Add(spawnableWaveBase); - } - - if (WaveManager.Waves.Contains(spawnableWaveBase)) - { - WaveManager.Waves.Remove(spawnableWaveBase); + timeBasedWave.Timer.IsForcefullyPaused = isForcePause; } } } - /// - /// Clears all active respawn waves from . - /// and stores them in for later restoration. - /// - /// - /// This completely removes waves from the active wave list. - /// - public static void ClaerWaves() - { - PausedWaves.Clear(); - PausedWaves.AddRange(WaveManager.Waves); - WaveManager.Waves.Clear(); - } - /// /// Forcefully pauses or resumes all time-based respawn waves by controlling their timers. /// @@ -457,6 +439,55 @@ public static void PauseWaves(List spawnableFactions) } } + /// + /// Removes a respawn wave from the active wave list and adds it to the paused wave list. + /// + /// The faction whose respawn wave will be cleared from active waves. + public static void ClearWave(SpawnableFaction spawnableFaction) + { + if (TryGetWaveBase(spawnableFaction, out SpawnableWaveBase spawnableWaveBase)) + { + if (!PausedWaves.Contains(spawnableWaveBase)) + { + PausedWaves.Add(spawnableWaveBase); + } + + if (WaveManager.Waves.Contains(spawnableWaveBase)) + { + WaveManager.Waves.Remove(spawnableWaveBase); + } + } + } + + /// + /// Clears all active respawn waves from . + /// and stores them in for later restoration. + /// + /// + /// This completely removes waves from the active wave list. + /// + public static void ClearWaves() + { + PausedWaves.Clear(); + PausedWaves.AddRange(WaveManager.Waves); + WaveManager.Waves.Clear(); + } + + /// + /// Pauses the specified list of respawn waves by iterating through each wave + /// and pausing it using the method. + /// + /// + /// A list of instances representing the waves to pause. + /// + public static void ClearWaves(List spawnableFactions) + { + foreach (SpawnableFaction spawnableFaction in spawnableFactions) + { + PauseWave(spawnableFaction); + } + } + /// /// Resumes respawn waves by filling WaveManager.Waves with values stored in . ///