mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +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
|
|
@ -14,11 +14,11 @@ namespace MinecraftClient.Protocol.Keys
|
|||
{
|
||||
private const string KeysCacheFilePlaintext = "ProfileKeyCache.ini";
|
||||
|
||||
private static FileMonitor cachemonitor;
|
||||
private static Dictionary<string, PlayerKeyPair> keys = new Dictionary<string, PlayerKeyPair>();
|
||||
private static Timer updatetimer = new Timer(100);
|
||||
private static List<KeyValuePair<string, PlayerKeyPair>> pendingadds = new List<KeyValuePair<string, PlayerKeyPair>>();
|
||||
private static BinaryFormatter formatter = new BinaryFormatter();
|
||||
private static FileMonitor? cachemonitor;
|
||||
private static readonly Dictionary<string, PlayerKeyPair> keys = new();
|
||||
private static readonly Timer updatetimer = new(100);
|
||||
private static readonly List<KeyValuePair<string, PlayerKeyPair>> pendingadds = new();
|
||||
private static readonly BinaryFormatter formatter = new();
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve whether KeysCache contains a keys for the given login.
|
||||
|
|
@ -93,7 +93,7 @@ namespace MinecraftClient.Protocol.Keys
|
|||
/// </summary>
|
||||
/// <param name="sender">Sender</param>
|
||||
/// <param name="e">Event data</param>
|
||||
private static void HandlePending(object sender, ElapsedEventArgs e)
|
||||
private static void HandlePending(object? sender, ElapsedEventArgs e)
|
||||
{
|
||||
updatetimer.Stop();
|
||||
LoadFromDisk();
|
||||
|
|
@ -177,9 +177,11 @@ namespace MinecraftClient.Protocol.Keys
|
|||
if (Settings.DebugMessages)
|
||||
Translations.WriteLineFormatted("cache.saving_keys");
|
||||
|
||||
List<string> KeysCacheLines = new List<string>();
|
||||
KeysCacheLines.Add("# Generated by MCC v" + Program.Version + " - Keep it secret & Edit at own risk!");
|
||||
KeysCacheLines.Add("# ProfileKey=PublicKey(base64),PublicKeySignature(base64),PublicKeySignatureV2(base64),PrivateKey(base64),ExpiresAt,RefreshAfter");
|
||||
List<string> KeysCacheLines = new()
|
||||
{
|
||||
"# Generated by MCC v" + Program.Version + " - Keep it secret & Edit at own risk!",
|
||||
"# ProfileKey=PublicKey(base64),PublicKeySignature(base64),PublicKeySignatureV2(base64),PrivateKey(base64),ExpiresAt,RefreshAfter"
|
||||
};
|
||||
foreach (KeyValuePair<string, PlayerKeyPair> entry in keys)
|
||||
KeysCacheLines.Add(entry.Key + '=' + entry.Value.ToString());
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue