mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Re-add /reco and /connect when connection is lost
This commit is contained in:
parent
cfb313fa01
commit
86efb38fa9
1 changed files with 11 additions and 8 deletions
|
|
@ -239,21 +239,24 @@ namespace MinecraftClient
|
|||
/// <summary>
|
||||
/// Pause the program, usually when an error or a kick occured, letting the user press Enter to quit OR type /reconnect
|
||||
/// </summary>
|
||||
/// <returns>Return True if the user typed "/reconnect"</returns>
|
||||
|
||||
public static bool ReadLineReconnect()
|
||||
public static void ReadLineReconnect()
|
||||
{
|
||||
if (!Settings.exitOnFailure)
|
||||
{
|
||||
string text = Console.ReadLine();
|
||||
if (text == "reco" || text == "reconnect" || text == "/reco" || text == "/reconnect")
|
||||
string text = Console.ReadLine().Trim();
|
||||
if (text.Length > 0 && (Settings.internalCmdChar == ' ' || text[0] == Settings.internalCmdChar))
|
||||
{
|
||||
Program.Restart();
|
||||
return true;
|
||||
if (Settings.internalCmdChar != ' ')
|
||||
text = text.Substring(1);
|
||||
|
||||
if (text.StartsWith("reco"))
|
||||
new Commands.Reco().Run(null, Settings.expandVars(text));
|
||||
|
||||
if (text.StartsWith("connect"))
|
||||
new Commands.Connect().Run(null, Settings.expandVars(text));
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
else return false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue