Skip to content

Commit 26321c6

Browse files
authored
fix: Fix staff message wrong target (#542)
Update Map.cs
1 parent 431e389 commit 26321c6

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

  • EXILED/Exiled.API/Features

EXILED/Exiled.API/Features/Map.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,12 @@ public static bool IsDecontaminationEnabled
117117
public static void StaffMessage(string message, Player player = null)
118118
{
119119
player ??= Server.Host;
120-
121120
foreach (Player target in Player.List)
122121
{
123122
if (!CommandProcessor.CheckPermissions(target.Sender, PlayerPermissions.AdminChat))
124123
continue;
125124

126-
player.ReferenceHub.encryptedChannelManager.TrySendMessageToClient(player.NetId + "!" + message, EncryptedChannelManager.EncryptedChannel.AdminChat);
125+
target.ReferenceHub.encryptedChannelManager.TrySendMessageToClient(player.NetId + "!" + message, EncryptedChannelManager.EncryptedChannel.AdminChat);
127126
}
128127
}
129128

@@ -420,4 +419,4 @@ internal static void ClearCache()
420419
#pragma warning restore CS0618
421420
}
422421
}
423-
}
422+
}

0 commit comments

Comments
 (0)