Fix all warnings & Trim (#2226)

* Fix AutoFishing crash
* Fix all warnings
* Remove DotNetZip.
* Fix the usage of HttpClient.
This commit is contained in:
BruceChen 2022-10-02 18:31:08 +08:00 committed by GitHub
parent 4aa6c1c99f
commit 1d52d1eadd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
227 changed files with 2201 additions and 43564 deletions

View file

@ -1,7 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.Generic;
namespace MinecraftClient.Commands
{
@ -11,14 +8,14 @@ namespace MinecraftClient.Commands
public override string CmdUsage { get { return "set varname=value"; } }
public override string CmdDesc { get { return "cmd.set.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[] temp = getArg(command).Split('=');
string[] temp = GetArg(command).Split('=');
if (temp.Length > 1)
{
if (Settings.SetVar(temp[0], getArg(command).Substring(temp[0].Length + 1)))
if (Settings.SetVar(temp[0], GetArg(command).Substring(temp[0].Length + 1)))
{
return ""; //Success
}