mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
Modernize null-check patterns: use 'is null' and 'is not null'
Replace '== null' with 'is null' and '!= null' with 'is not null' across 19 core files following modern C# pattern matching conventions. Only literal null comparisons are changed. Assignments, value comparisons, and LINQ expressions are left untouched. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
902e944cbb
commit
c5df6a49c6
19 changed files with 111 additions and 111 deletions
|
|
@ -123,7 +123,7 @@ namespace MinecraftClient.Protocol.Message
|
|||
{
|
||||
string sender = message.isSenderJson ? ParseText(message.displayName!) : message.displayName!;
|
||||
string content;
|
||||
if (Config.Signature.ShowModifiedChat && message.unsignedContent != null)
|
||||
if (Config.Signature.ShowModifiedChat && message.unsignedContent is not null)
|
||||
{
|
||||
content = ParseText(message.unsignedContent!);
|
||||
if (string.IsNullOrEmpty(content))
|
||||
|
|
@ -315,7 +315,7 @@ namespace MinecraftClient.Protocol.Message
|
|||
Task<Dictionary<string, string>?> fetckFileTask =
|
||||
httpClient.GetFromJsonAsync<Dictionary<string, string>>(translation_file_location);
|
||||
fetckFileTask.Wait();
|
||||
if (fetckFileTask.Result != null && fetckFileTask.Result.Count > 0)
|
||||
if (fetckFileTask.Result is not null && fetckFileTask.Result.Count > 0)
|
||||
{
|
||||
TranslationRules = fetckFileTask.Result;
|
||||
TranslationRules["Version"] = TranslationsFile_Version;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue