forked from Exiled-Official/EXILED
-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Porting EXILED9 RespawnedTeam event. by.VALERA771 (#27)
- Loading branch information
Showing
3 changed files
with
61 additions
and
2 deletions.
There are no files selected for viewing
43 changes: 43 additions & 0 deletions
43
EXILED/Exiled.Events/EventArgs/Server/RespawnedTeamEventArgs.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// ----------------------------------------------------------------------- | ||
// <copyright file="RespawnedTeamEventArgs.cs" company="Exiled Team"> | ||
// Copyright (c) Exiled Team. All rights reserved. | ||
// Licensed under the CC BY-SA 3.0 license. | ||
// </copyright> | ||
// ----------------------------------------------------------------------- | ||
|
||
namespace Exiled.Events.EventArgs.Server | ||
{ | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
|
||
using Exiled.API.Features; | ||
using Exiled.Events.EventArgs.Interfaces; | ||
using Respawning; | ||
|
||
/// <summary> | ||
/// Contains all information after team spawns. | ||
/// </summary> | ||
public class RespawnedTeamEventArgs : IExiledEvent | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="RespawnedTeamEventArgs"/> class. | ||
/// </summary> | ||
/// <param name="hubs"><inheritdoc cref="Players"/></param> | ||
/// <param name="team"><inheritdoc cref="Team"/></param> | ||
public RespawnedTeamEventArgs(SpawnableTeamType team, IEnumerable<ReferenceHub> hubs) | ||
{ | ||
Players = hubs.Select(Player.Get); | ||
Team = team; | ||
} | ||
|
||
/// <summary> | ||
/// Gets the list of spawned players. | ||
/// </summary> | ||
public IEnumerable<Player> Players { get; } | ||
|
||
/// <summary> | ||
/// Gets the spawned team. | ||
/// </summary> | ||
public SpawnableTeamType Team { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters