Skip to content

Commit

Permalink
Fix killEveryone with teams enabled
Browse files Browse the repository at this point in the history
Now when a person dies with killEveryone enabled, it'll only kill players on the same team
  • Loading branch information
Kuz-zzz authored Oct 29, 2023
1 parent 937e86d commit 02e9bd1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions StayClose/StayClose.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,13 @@ internal static void TimerElapsed(object? sender, ElapsedEventArgs args, string
{
foreach (TSPlayer player in TShock.Players)
{
if (config.enableTeams)
{
if (player.Team != TSPlayer.FindByNameOrID(playerName)[0].Team)
{
continue;
}
}
if (player != null && player.RealPlayer && !player.Dead)
{
player.KillPlayer();
Expand Down

0 comments on commit 02e9bd1

Please sign in to comment.