Save world on last player exit; fixes #707
This commit is contained in:
parent
e18ab50453
commit
21cd90fa23
1 changed files with 6 additions and 0 deletions
|
|
@ -1022,6 +1022,12 @@ namespace TShockAPI
|
||||||
RememberedPos.InsertLeavePos(tsplr.Name, tsplr.IP, (int) (tsplr.X/16), (int) (tsplr.Y/16));
|
RememberedPos.InsertLeavePos(tsplr.Name, tsplr.IP, (int) (tsplr.X/16), (int) (tsplr.Y/16));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The last player will leave after this hook is executed.
|
||||||
|
if (Utils.ActivePlayers() == 1)
|
||||||
|
{
|
||||||
|
SaveManager.Instance.SaveWorld();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnChat(ServerChatEventArgs args)
|
private void OnChat(ServerChatEventArgs args)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue