Remove Utils.ForceKickAll; add TSPlayer.KickAll.
This commit is contained in:
parent
1ea04ffd4f
commit
8301d6a6f3
3 changed files with 18 additions and 18 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue