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:
parent
74035d5c1e
commit
13e00c7d2d
1 changed files with 12 additions and 0 deletions
|
|
@ -986,6 +986,18 @@ namespace TShockAPI
|
||||||
|
|
||||||
private static void Off(CommandArgs args)
|
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!");
|
TShock.Utils.ForceKickAll("Server shutting down!");
|
||||||
WorldGen.saveWorld();
|
WorldGen.saveWorld();
|
||||||
Netplay.disconnect = true;
|
Netplay.disconnect = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue