Ensure that players can not connect once the server started shutting down
This commit is contained in:
parent
60a8362e27
commit
5be85b9864
2 changed files with 12 additions and 0 deletions
|
|
@ -538,6 +538,8 @@ namespace TShockAPI
|
|||
/// <param name="reason">string reason (default: "Server shutting down!")</param>
|
||||
public void StopServer(bool save = true, string reason = "Server shutting down!")
|
||||
{
|
||||
TShock.ShuttingDown = true;
|
||||
|
||||
ForceKickAll(reason);
|
||||
if (save)
|
||||
SaveManager.Instance.SaveWorld();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue