make color parse as hex

This commit is contained in:
Pyrbu 2023-06-26 13:10:50 +02:00
parent 984d7e873d
commit 37e8b42997

@ -20,7 +20,7 @@ public class ColorParser extends ParserType<Color> {
if (color.startsWith("&")) color = color.substring(1); if (color.startsWith("&")) color = color.substring(1);
if (color.startsWith("#")) color = color.substring(1); if (color.startsWith("#")) color = color.substring(1);
try { try {
return Color.fromRGB(Integer.parseInt(color)); return Color.fromRGB(Integer.parseInt(color, 16));
} catch (IllegalArgumentException exception) { } catch (IllegalArgumentException exception) {
throw new CommandExecutionException(); throw new CommandExecutionException();
} }