make color parse as hex
This commit is contained in:
parent
984d7e873d
commit
37e8b42997
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue