From fc689dbbc53c537dd60b526c539b5eda4fc622f8 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Wed, 27 Dec 2017 18:20:47 -0700 Subject: [PATCH] Remove TSPlayer.KickAll MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "☕⚡ Ivan - Today at 6:20 PM @☕⚡ ハクサロ wouldnt TSPlayer.All.Kick() do the trick?" --- CHANGELOG.md | 1 - TShockAPI/TSPlayer.cs | 16 ---------------- 2 files changed, 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4a2a203..8b81bb18 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -69,7 +69,6 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin * Removed `Utils.ActivePlayers()` -- use `TShock.Players.Length` instead. (@hakusaro) * Moved `Utils.Kick()` to `TSPlayer` since its first argument was a `TSPlayer` object. (@hakusaro) * Removed `Utils.ForceKick()`. (@hakusaro) -* Replaced `Utils.ForceKickAll()` with `TSPlayer.KickAll`. (@hakusaro) ## TShock 4.3.25 * Fixed a critical exploit in the Terraria protocol that could cause massive unpreventable world corruption as well as a number of other problems. Thanks to @bartico6 for reporting. Fixed by the efforts of @QuiCM, @hakusaro, and tips in the right directioon from @bartico6. diff --git a/TShockAPI/TSPlayer.cs b/TShockAPI/TSPlayer.cs index d40d362e..bb94688a 100644 --- a/TShockAPI/TSPlayer.cs +++ b/TShockAPI/TSPlayer.cs @@ -110,22 +110,6 @@ namespace TShockAPI return found; } - /// - /// Disconnects all players from the server without checking for immunetokick permission. - /// - /// If the kick should bypass permission checks. - /// The reason for the kick. - public static void KickAll(bool force, string reason) - { - foreach (TSPlayer player in TShock.Players) - { - if (player != null && player.Active) - { - player.Kick(reason, force, true, null, true); - } - } - } - /// /// The amount of tiles that the player has killed in the last second. ///