Save SSI on /off

Should technically solve #339, but there are probably more instances around the codebase that have the same issue.
This commit is contained in:
Lucas Nicodemus 2012-01-31 02:10:05 -07:00
parent 74035d5c1e
commit 13e00c7d2d

View file

@ -986,6 +986,18 @@ namespace TShockAPI
private static void Off(CommandArgs args)
{
if (TShock.Config.ServerSideInventory)
{
foreach (TSPlayer player in TShock.Players)
{
if (player != null && player.IsLoggedIn && !player.IgnoreActionsForClearingTrashCan)
{
TShock.InventoryDB.InsertPlayerData(player);
}
}
}
TShock.Utils.ForceKickAll("Server shutting down!");
WorldGen.saveWorld();
Netplay.disconnect = true;