mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2026-08-15 13:04:36 +00:00
refactor: convert == null / != null to is null / is not null in 31 files
Replace old-style null comparisons with modern C# pattern matching syntax across Commands, Protocol, Mapping, ChatBots, Physics, Inventory, Logger, CommandHandler, Scripting, Crypto, and other modules. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
446c6e7739
commit
c7bc25aa17
31 changed files with 77 additions and 77 deletions
|
|
@ -1150,7 +1150,7 @@ namespace MinecraftClient
|
|||
|
||||
break;
|
||||
default:
|
||||
if (localVars != null && localVars.ContainsKey(varname_lower))
|
||||
if (localVars is not null && localVars.ContainsKey(varname_lower))
|
||||
result.Append(localVars[varname_lower].ToString());
|
||||
else if (TryGetVar(varname_lower, out object? var_value))
|
||||
result.Append(var_value.ToString());
|
||||
|
|
@ -1979,7 +1979,7 @@ namespace MinecraftClient
|
|||
public static string GetFullMessage(this Exception ex)
|
||||
{
|
||||
string msg = ex.Message.Replace("+", "->");
|
||||
return ex.InnerException == null
|
||||
return ex.InnerException is null
|
||||
? msg
|
||||
: msg + "\n --> " + ex.InnerException.GetFullMessage();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue