Fix /cmdunload null erroring

This commit is contained in:
UnknownShadow200 2020-04-13 11:05:46 +10:00
parent 6a03bffebe
commit cd8b4b710f

View File

@ -104,7 +104,9 @@ namespace MCGalaxy {
grp.Commands.Remove(cmd); grp.Commands.Remove(cmd);
} }
Alias.UnregisterDefaults(cmd); // typically Command.Unregister(Command.Find("xyz"))
// So don't error if Command.Find returned null
if (cmd != null) Alias.UnregisterDefaults(cmd);
return removed; return removed;
} }