diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index b005d54a..57217799 100644 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -54,6 +54,7 @@ namespace TShockAPI TShock.admincommandList.Add("kill", new CommandDelegate(Kill)); TShock.admincommandList.Add("help", new CommandDelegate(Help)); TShock.admincommandList.Add("slap", new CommandDelegate(Slap)); + TShock.admincommandList.Add("off-nosave", new CommandDelegate(OffNoSave)); TShock.commandList.Add("help", new CommandDelegate(Help)); TShock.commandList.Add("kill", new CommandDelegate(Kill)); } @@ -96,6 +97,12 @@ namespace TShockAPI } public static void Off(CommandArgs args) + { + WorldGen.saveWorld(); + Netplay.disconnect = true; + } + + public static void OffNoSave(CommandArgs args) { Netplay.disconnect = true; } diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index f036887d..62248162 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -312,7 +312,7 @@ namespace TShockAPI for (uint i = 0; i < Main.maxPlayers; i++) { if (Main.player[i].active == false) { continue; } - if (players[i].tileThreshold >= 5) + if (players[i].tileThreshold >= 20) { if (Main.player[i] != null) {