Remove Utils.ForceKickAll; add TSPlayer.KickAll.

This commit is contained in:
Lucas Nicodemus 2017-12-27 18:06:01 -07:00
parent 1ea04ffd4f
commit 8301d6a6f3
3 changed files with 18 additions and 18 deletions

View file

@ -110,6 +110,22 @@ namespace TShockAPI
return found;
}
/// <summary>
/// Disconnects all players from the server without checking for immunetokick permission.
/// </summary>
/// <param name="force">If the kick should bypass permission checks.</param>
/// <param name="reason">The reason for the kick.</param>
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);
}
}
}
/// <summary>
/// The amount of tiles that the player has killed in the last second.
/// </summary>