Ensure that players can not connect once the server started shutting down

This commit is contained in:
Simon 2016-10-16 13:58:05 +03:00
parent 60a8362e27
commit 5be85b9864
2 changed files with 12 additions and 0 deletions

View file

@ -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();