Fix /ccols add with invalid hex colour erroring. (Thanks Brett)

This commit is contained in:
UnknownShadow200 2017-04-17 07:45:45 +10:00
parent 2599a6a2cb
commit d221fa1800

View File

@ -73,7 +73,7 @@ namespace MCGalaxy.Commands.CPE {
char fallback;
if (!CheckName(p, args[2]) || !CheckFallback(p, args[3], out fallback)) return;
CustomColor col = Colors.ParseHex(args[4]);
CustomColor col = default(CustomColor);
if (!CommandParser.GetHex(p, args[4], ref col)) return;
col.Code = code; col.Fallback = fallback; col.Name = args[2];