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:
copilot-swe-agent[bot] 2026-03-24 00:27:07 +00:00
parent 902e944cbb
commit c5df6a49c6
19 changed files with 111 additions and 111 deletions

View file

@ -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;