mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Fix all warnings & Trim (#2226)
* Fix AutoFishing crash * Fix all warnings * Remove DotNetZip. * Fix the usage of HttpClient.
This commit is contained in:
parent
4aa6c1c99f
commit
1d52d1eadd
227 changed files with 2201 additions and 43564 deletions
|
|
@ -10,11 +10,11 @@ namespace MinecraftClient.Commands
|
|||
public override string CmdUsage { get { return "execmulti <command 1> -> <command2> -> <command 3> -> ..."; } }
|
||||
public override string CmdDesc { get { return "cmd.execmulti.desc"; } }
|
||||
|
||||
public override string Run(McClient handler, string command, Dictionary<string, object> localVars)
|
||||
public override string Run(McClient handler, string command, Dictionary<string, object>? localVars)
|
||||
{
|
||||
if (hasArg(command))
|
||||
if (HasArg(command))
|
||||
{
|
||||
string commandsString = getArg(command);
|
||||
string commandsString = GetArg(command);
|
||||
|
||||
if (commandsString.Contains("execmulti", StringComparison.OrdinalIgnoreCase) || commandsString.Contains("execif", StringComparison.OrdinalIgnoreCase))
|
||||
return Translations.TryGet("cmd.execmulti.prevent");
|
||||
|
|
@ -25,16 +25,17 @@ namespace MinecraftClient.Commands
|
|||
|
||||
foreach (string cmd in commands)
|
||||
{
|
||||
string output = "";
|
||||
string? output = "";
|
||||
handler.PerformInternalCommand(cmd, ref output);
|
||||
|
||||
string log = Translations.TryGet(
|
||||
"cmd.execmulti.executed", cmd,
|
||||
string.IsNullOrEmpty(output) ? Translations.TryGet("cmd.execmulti.no_result") : Translations.TryGet("cmd.execmulti.result", output));
|
||||
|
||||
if (output.Contains("unknown command", StringComparison.OrdinalIgnoreCase))
|
||||
if (output != null && output.Contains("unknown command", StringComparison.OrdinalIgnoreCase))
|
||||
handler.Log.Error(log);
|
||||
else handler.Log.Info(log);
|
||||
else
|
||||
handler.Log.Info(log);
|
||||
}
|
||||
|
||||
return "";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue