mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-29 13:04:59 +00:00
Fix AutoRelog
This commit is contained in:
parent
dee085686f
commit
d222d5f683
10 changed files with 16 additions and 16 deletions
|
|
@ -129,10 +129,10 @@ namespace MinecraftClient.ChatBots
|
|||
|
||||
private void LaunchDelayedReconnection(string? msg)
|
||||
{
|
||||
int delay = random.Next(Settings.DoubleToTick(Config.Delay.min), Settings.DoubleToTick(Config.Delay.max));
|
||||
LogDebugToConsoleTranslated(String.IsNullOrEmpty(msg) ? "bot.autoRelog.reconnect_always" : "bot.autoRelog.reconnect", msg);
|
||||
double delay = random.NextDouble() * (Config.Delay.max - Config.Delay.min) + Config.Delay.min;
|
||||
LogDebugToConsoleTranslated(string.IsNullOrEmpty(msg) ? "bot.autoRelog.reconnect_always" : "bot.autoRelog.reconnect", msg);
|
||||
LogToConsoleTranslated("bot.autoRelog.wait", delay);
|
||||
System.Threading.Thread.Sleep(delay * 1000);
|
||||
System.Threading.Thread.Sleep((int)Math.Floor(delay * 1000));
|
||||
ReconnectToTheServer();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue