[SKIP_BUILD] FIx "/reco" and "/connect" not working properly

This commit is contained in:
BruceChen 2022-11-05 20:27:10 +08:00
parent d56dd4a74a
commit ae23ead4c3
7 changed files with 54 additions and 31 deletions

View file

@ -920,7 +920,7 @@ namespace MinecraftClient
/// </summary>
/// <param name="ExtraAttempts">In case of failure, maximum extra attempts before aborting</param>
/// <param name="delaySeconds">Optional delay, in seconds, before restarting</param>
protected void ReconnectToTheServer(int ExtraAttempts = 3, int delaySeconds = 0)
protected void ReconnectToTheServer(int ExtraAttempts = 3, int delaySeconds = 0, bool keepAccountAndServerSettings = false)
{
if (Settings.Config.Logging.DebugMessages)
{
@ -928,7 +928,7 @@ namespace MinecraftClient
ConsoleIO.WriteLogLine(string.Format(Translations.chatbot_reconnect, botName));
}
McClient.ReconnectionAttemptsLeft = ExtraAttempts;
Program.Restart(delaySeconds);
Program.Restart(delaySeconds, keepAccountAndServerSettings);
}
/// <summary>