Skip to content

Commit 1e2643a

Browse files
committed
Merge branch 'Stored-Component' of https://github.com/louis1706/EXILED into Stored-Component
2 parents 61e70a0 + d10ae40 commit 1e2643a

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

EXILED/Exiled.Events/Events.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ public override void OnEnabled()
7373
Handlers.Player.Verified += Handlers.Internal.Round.OnVerified;
7474
Handlers.Map.ChangedIntoGrenade += Handlers.Internal.ExplodingGrenade.OnChangedIntoGrenade;
7575

76+
RoleAssigner.OnPlayersSpawned += Handlers.Server.OnAllPlayersSpawned;
7677
CharacterClassManager.OnRoundStarted += Handlers.Server.OnRoundStarted;
7778
WaveManager.OnWaveSpawned += Handlers.Server.OnRespawnedTeam;
7879
InventorySystem.InventoryExtensions.OnItemAdded += Handlers.Player.OnItemAdded;
@@ -112,7 +113,7 @@ public override void OnDisabled()
112113
Handlers.Map.ChangedIntoGrenade -= Handlers.Internal.ExplodingGrenade.OnChangedIntoGrenade;
113114

114115
CharacterClassManager.OnRoundStarted -= Handlers.Server.OnRoundStarted;
115-
116+
RoleAssigner.OnPlayersSpawned -= Handlers.Server.OnAllPlayersSpawned;
116117
InventorySystem.InventoryExtensions.OnItemAdded -= Handlers.Player.OnItemAdded;
117118
InventorySystem.InventoryExtensions.OnItemRemoved -= Handlers.Player.OnItemRemoved;
118119
WaveManager.OnWaveSpawned -= Handlers.Server.OnRespawnedTeam;

EXILED/Exiled.Events/Handlers/Server.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ public static class Server
3232
/// </summary>
3333
public static Event RoundStarted { get; set; } = new();
3434

35+
/// <summary>
36+
/// Invoked after all players have spawned at the start of a new round.
37+
/// </summary>
38+
public static Event AllPlayersSpawned { get; set; } = new();
39+
3540
/// <summary>
3641
/// Invoked before ending a round.
3742
/// </summary>
@@ -137,6 +142,11 @@ public static class Server
137142
/// </summary>
138143
public static void OnRoundStarted() => RoundStarted.InvokeSafely();
139144

145+
/// <summary>
146+
/// Called after all players have spawned at the start of a new round.
147+
/// </summary>
148+
public static void OnAllPlayersSpawned() => AllPlayersSpawned.InvokeSafely();
149+
140150
/// <summary>
141151
/// Called before ending a round.
142152
/// </summary>
@@ -245,4 +255,4 @@ public static class Server
245255
/// <param name="ev">The <see cref="CompletingObjectiveEventArgs"/> instance.</param>
246256
public static void OnCompletingObjective(CompletingObjectiveEventArgs ev) => CompletingObjective.InvokeSafely(ev);
247257
}
248-
}
258+
}

0 commit comments

Comments
 (0)