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

@ -13,8 +13,8 @@ namespace MinecraftClient.Proxy
{
public enum Type { HTTP, SOCKS4, SOCKS4a, SOCKS5 };
private static ProxyClientFactory factory = new ProxyClientFactory();
private static IProxyClient proxy;
private static readonly ProxyClientFactory factory = new();
private static IProxyClient? proxy;
private static bool proxy_ok = false;
/// <summary>
@ -24,7 +24,7 @@ namespace MinecraftClient.Proxy
/// <param name="port">Target port</param>
/// <param name="login">True if the purpose is logging in to a Minecraft account</param>
public static TcpClient newTcpClient(string host, int port, bool login = false)
public static TcpClient NewTcpClient(string host, int port, bool login = false)
{
try
{