Added ForceKillAll to kick all players.
This commit is contained in:
parent
3af6e990dc
commit
3ced4fc089
3 changed files with 19 additions and 21 deletions
|
|
@ -196,6 +196,22 @@ namespace TShockAPI
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Kicks all player from the server without checking for immunetokick permission.
|
||||
/// </summary>
|
||||
/// <param name="ply">int player</param>
|
||||
/// <param name="reason">string reason</param>
|
||||
public static void ForceKickAll(string reason)
|
||||
{
|
||||
for (int player = 0; player < Main.maxPlayers; player++)
|
||||
{
|
||||
if (Main.player[player].active)
|
||||
{
|
||||
Tools.ForceKick(player, reason);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Kicks a player from the server without checking for immunetokick permission.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue