From 3bed40ec65cc1066ca37ba52cb295bea70631d16 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Mon, 11 Dec 2017 16:01:09 -0700 Subject: [PATCH] Remove Utils.RestartServer (thanks @QuiCM!) --- TShockAPI/Utils.cs | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/TShockAPI/Utils.cs b/TShockAPI/Utils.cs index e99aadd6..8314de92 100644 --- a/TShockAPI/Utils.cs +++ b/TShockAPI/Utils.cs @@ -580,24 +580,6 @@ namespace TShockAPI Netplay.disconnect = true; } - /// - /// Stops the server after kicking all players with a reason message, and optionally saving the world then attempts to - /// restart it. - /// - /// bool perform a world save before stop (default: true) - /// string reason (default: "Server shutting down!") - public void RestartServer(bool save = true, string reason = "Server shutting down!") - { - if (Main.ServerSideCharacter) - foreach (TSPlayer player in TShock.Players) - if (player != null && player.IsLoggedIn && !player.IgnoreActionsForClearingTrashCan) - TShock.CharacterDB.InsertPlayerData(player); - - StopServer(true, reason); - System.Diagnostics.Process.Start(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); - Environment.Exit(0); - } - /// /// Reloads all configuration settings, groups, regions and raises the reload event. ///