From 904865e04f86424b77b27023aa7d138ed5dfe220 Mon Sep 17 00:00:00 2001 From: IRacle Date: Wed, 14 Aug 2024 15:36:50 +0300 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=92=80=F0=9F=92=80=F0=9F=92=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EXILED/Exiled.API/Features/Player.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/EXILED/Exiled.API/Features/Player.cs b/EXILED/Exiled.API/Features/Player.cs index 0a2b20b4f2..b5890c2a75 100644 --- a/EXILED/Exiled.API/Features/Player.cs +++ b/EXILED/Exiled.API/Features/Player.cs @@ -1277,13 +1277,8 @@ public static Player Get(GameObject gameObject) if (Dictionary.TryGetValue(gameObject, out Player player)) return player; - if (UnverifiedPlayers.TryGetValue(gameObject, out player)) - return player; - - if (ReferenceHub.TryGetHub(gameObject, out ReferenceHub hub)) - return new(hub); - - return null; + UnverifiedPlayers.TryGetValue(gameObject, out player); + return player; } /// From bcb78e70ede8b6bf7a022fe55bcd06b06f442430 Mon Sep 17 00:00:00 2001 From: IRacle Date: Thu, 15 Aug 2024 14:38:35 +0300 Subject: [PATCH 2/3] `SendStaffMessage` fix --- EXILED/Exiled.API/Features/Player.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EXILED/Exiled.API/Features/Player.cs b/EXILED/Exiled.API/Features/Player.cs index b5890c2a75..175d7731aa 100644 --- a/EXILED/Exiled.API/Features/Player.cs +++ b/EXILED/Exiled.API/Features/Player.cs @@ -2288,7 +2288,7 @@ public void RemoteAdminMessage(string message, bool success = true, string plugi /// if message was send; otherwise, . public bool SendStaffMessage(string message, EncryptedChannelManager.EncryptedChannel channel = EncryptedChannelManager.EncryptedChannel.AdminChat) { - return ReferenceHub.encryptedChannelManager.TrySendMessageToClient("!" + NetId + message, channel); + return ReferenceHub.encryptedChannelManager.TrySendMessageToClient(NetId + "!" + message, channel); } /// @@ -2299,7 +2299,7 @@ public bool SendStaffMessage(string message, EncryptedChannelManager.EncryptedCh /// if message was send; otherwise, . public bool SendStaffPing(string message, EncryptedChannelManager.EncryptedChannel channel = EncryptedChannelManager.EncryptedChannel.AdminChat) { - return ReferenceHub.encryptedChannelManager.TrySendMessageToClient("!0" + message, channel); + return ReferenceHub.encryptedChannelManager.TrySendMessageToClient("0!" + message, channel); } /// From 7befb7a4c2a82c6336c1b564f1c346486932c440 Mon Sep 17 00:00:00 2001 From: IRacle Date: Fri, 16 Aug 2024 16:42:17 +0300 Subject: [PATCH 3/3] =?UTF-8?q?Revert=20"=F0=9F=92=80=F0=9F=92=80?= =?UTF-8?q?=F0=9F=92=80"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 904865e04f86424b77b27023aa7d138ed5dfe220. --- EXILED/Exiled.API/Features/Player.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/EXILED/Exiled.API/Features/Player.cs b/EXILED/Exiled.API/Features/Player.cs index 175d7731aa..b7a4afee54 100644 --- a/EXILED/Exiled.API/Features/Player.cs +++ b/EXILED/Exiled.API/Features/Player.cs @@ -1277,8 +1277,13 @@ public static Player Get(GameObject gameObject) if (Dictionary.TryGetValue(gameObject, out Player player)) return player; - UnverifiedPlayers.TryGetValue(gameObject, out player); - return player; + if (UnverifiedPlayers.TryGetValue(gameObject, out player)) + return player; + + if (ReferenceHub.TryGetHub(gameObject, out ReferenceHub hub)) + return new(hub); + + return null; } ///