mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Bug fix
This commit is contained in:
parent
7ee08092d4
commit
9c8afb7d3c
4 changed files with 5 additions and 9 deletions
|
|
@ -203,7 +203,7 @@ namespace MinecraftClient
|
||||||
Log.Info(string.Format(Translations.mcc_joined, Config.Main.Advanced.InternalCmdChar.ToLogString()));
|
Log.Info(string.Format(Translations.mcc_joined, Config.Main.Advanced.InternalCmdChar.ToLogString()));
|
||||||
|
|
||||||
cmdprompt = new CancellationTokenSource();
|
cmdprompt = new CancellationTokenSource();
|
||||||
ConsoleInteractive.ConsoleReader.BeginReadThread(cmdprompt);
|
ConsoleInteractive.ConsoleReader.BeginReadThread();
|
||||||
ConsoleInteractive.ConsoleReader.MessageReceived += ConsoleReaderOnMessageReceived;
|
ConsoleInteractive.ConsoleReader.MessageReceived += ConsoleReaderOnMessageReceived;
|
||||||
ConsoleInteractive.ConsoleReader.OnInputChange += ConsoleIO.AutocompleteHandler;
|
ConsoleInteractive.ConsoleReader.OnInputChange += ConsoleIO.AutocompleteHandler;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -287,7 +287,7 @@ namespace MinecraftClient
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(Config.Main.Advanced.ConsoleTitle))
|
if (OperatingSystem.IsWindows() && !string.IsNullOrWhiteSpace(Config.Main.Advanced.ConsoleTitle))
|
||||||
{
|
{
|
||||||
InternalConfig.Username = "New Window";
|
InternalConfig.Username = "New Window";
|
||||||
Console.Title = Config.AppVar.ExpandVars(Config.Main.Advanced.ConsoleTitle);
|
Console.Title = Config.AppVar.ExpandVars(Config.Main.Advanced.ConsoleTitle);
|
||||||
|
|
@ -463,7 +463,7 @@ namespace MinecraftClient
|
||||||
InternalConfig.Username = session.PlayerName;
|
InternalConfig.Username = session.PlayerName;
|
||||||
bool isRealms = false;
|
bool isRealms = false;
|
||||||
|
|
||||||
if (Config.Main.Advanced.ConsoleTitle != "")
|
if (OperatingSystem.IsWindows() && !string.IsNullOrWhiteSpace(Config.Main.Advanced.ConsoleTitle))
|
||||||
Console.Title = Config.AppVar.ExpandVars(Config.Main.Advanced.ConsoleTitle);
|
Console.Title = Config.AppVar.ExpandVars(Config.Main.Advanced.ConsoleTitle);
|
||||||
|
|
||||||
if (Config.Main.Advanced.PlayerHeadAsIcon && OperatingSystem.IsWindows())
|
if (Config.Main.Advanced.PlayerHeadAsIcon && OperatingSystem.IsWindows())
|
||||||
|
|
@ -614,7 +614,7 @@ namespace MinecraftClient
|
||||||
client = new McClient(session, playerKeyPair, InternalConfig.ServerIP, InternalConfig.ServerPort, protocolversion, forgeInfo);
|
client = new McClient(session, playerKeyPair, InternalConfig.ServerIP, InternalConfig.ServerPort, protocolversion, forgeInfo);
|
||||||
|
|
||||||
//Update console title
|
//Update console title
|
||||||
if (Config.Main.Advanced.ConsoleTitle != "")
|
if (OperatingSystem.IsWindows() && !string.IsNullOrWhiteSpace(Config.Main.Advanced.ConsoleTitle))
|
||||||
Console.Title = Config.AppVar.ExpandVars(Config.Main.Advanced.ConsoleTitle);
|
Console.Title = Config.AppVar.ExpandVars(Config.Main.Advanced.ConsoleTitle);
|
||||||
}
|
}
|
||||||
catch (NotSupportedException)
|
catch (NotSupportedException)
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,7 @@ namespace MinecraftClient.Scripting
|
||||||
"using System.Net;",
|
"using System.Net;",
|
||||||
"using System.Threading;",
|
"using System.Threading;",
|
||||||
"using MinecraftClient;",
|
"using MinecraftClient;",
|
||||||
|
"using MinecraftClient.Scripting;",
|
||||||
"using MinecraftClient.Mapping;",
|
"using MinecraftClient.Mapping;",
|
||||||
"using MinecraftClient.Inventory;",
|
"using MinecraftClient.Inventory;",
|
||||||
string.Join("\n", libs),
|
string.Join("\n", libs),
|
||||||
|
|
|
||||||
|
|
@ -1672,11 +1672,6 @@ namespace MinecraftClient.Scripting
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public string Run(McClient handler, string command, Dictionary<string, object>? localVars)
|
|
||||||
{
|
|
||||||
return Runner(command, GetArgs(command));
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// ChatBotCommand Constructor
|
/// ChatBotCommand Constructor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue