mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Added an option for custom timeout as requested in #1337.
This commit is contained in:
parent
e150bd569b
commit
42de4378e1
3 changed files with 14 additions and 8 deletions
|
|
@ -105,6 +105,7 @@ namespace MinecraftClient
|
|||
public static bool AutoRespawn = false;
|
||||
public static bool MinecraftRealmsEnabled = true;
|
||||
public static bool MoveHeadWhileWalking = true;
|
||||
public static int Timeout = 30;
|
||||
|
||||
// Signature
|
||||
public static bool LoginWithSecureProfile = true;
|
||||
|
|
@ -206,7 +207,7 @@ namespace MinecraftClient
|
|||
//AutoCraft
|
||||
public static bool AutoCraft_Enabled = false;
|
||||
public static string AutoCraft_configFile = @"autocraft\config.ini";
|
||||
|
||||
|
||||
//Mailer
|
||||
public static bool Mailer_Enabled = false;
|
||||
public static string Mailer_DatabaseFile = "MailerDatabase.ini";
|
||||
|
|
@ -355,10 +356,12 @@ namespace MinecraftClient
|
|||
{
|
||||
case "login": Login = argValue; return true;
|
||||
case "password": Password = argValue; return true;
|
||||
case "type": AccountType = argValue == "mojang"
|
||||
case "type":
|
||||
AccountType = argValue == "mojang"
|
||||
? ProtocolHandler.AccountType.Mojang
|
||||
: ProtocolHandler.AccountType.Microsoft; return true;
|
||||
case "method": LoginMethod = argValue.ToLower() == "browser"
|
||||
case "method":
|
||||
LoginMethod = argValue.ToLower() == "browser"
|
||||
? "browser"
|
||||
: "mcc"; return true;
|
||||
case "serverip": if (!SetServerIP(argValue)) ServerAliasTemp = argValue; return true;
|
||||
|
|
@ -386,6 +389,7 @@ namespace MinecraftClient
|
|||
case "debugmessages": DebugMessages = str2bool(argValue); return true;
|
||||
case "minecraftrealms": MinecraftRealmsEnabled = str2bool(argValue); return true;
|
||||
case "moveheadwhilewalking": MoveHeadWhileWalking = str2bool(argValue); return true;
|
||||
case "timeout": Timeout = str2int(argValue); return true;
|
||||
|
||||
case "botowners":
|
||||
Bots_Owners.Clear();
|
||||
|
|
@ -821,7 +825,7 @@ namespace MinecraftClient
|
|||
public static void WriteDefaultSettings(string settingsfile)
|
||||
{
|
||||
// Load embedded default config and adjust line break for the current operating system
|
||||
string settingsContents = String.Join(Environment.NewLine,
|
||||
string settingsContents = String.Join(Environment.NewLine,
|
||||
DefaultConfigResource.MinecraftClient.Split(new[] { "\r\n", "\r", "\n" }, StringSplitOptions.None));
|
||||
|
||||
// Write configuration file with current version number
|
||||
|
|
@ -843,7 +847,8 @@ namespace MinecraftClient
|
|||
{
|
||||
return Convert.ToInt32(str.Trim());
|
||||
}
|
||||
catch {
|
||||
catch
|
||||
{
|
||||
ConsoleIO.WriteLogLine(Translations.Get("error.setting.str2int", str));
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue