Remove Utils.RestartServer (thanks @QuiCM!)
This commit is contained in:
parent
9cf949cc60
commit
3bed40ec65
1 changed files with 0 additions and 18 deletions
|
|
@ -580,24 +580,6 @@ namespace TShockAPI
|
||||||
Netplay.disconnect = true;
|
Netplay.disconnect = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Stops the server after kicking all players with a reason message, and optionally saving the world then attempts to
|
|
||||||
/// restart it.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="save">bool perform a world save before stop (default: true)</param>
|
|
||||||
/// <param name="reason">string reason (default: "Server shutting down!")</param>
|
|
||||||
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);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reloads all configuration settings, groups, regions and raises the reload event.
|
/// Reloads all configuration settings, groups, regions and raises the reload event.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue