mirror of
https://github.com/BlueMap-Minecraft/BlueMapAPI.git
synced 2024-11-14 14:25:18 +01:00
Add invalid value to color-format exception
This commit is contained in:
parent
c70ab29ae8
commit
f9bbdc3d38
@ -136,7 +136,7 @@ private static int parseColorString(String val) {
|
||||
val.charAt(0) + val.charAt(0) + val.charAt(1) + val.charAt(1) +
|
||||
val.charAt(2) + val.charAt(2) + val.charAt(3) + val.charAt(3);
|
||||
if (val.length() == 6) val = val + "ff";
|
||||
if (val.length() != 8) throw new NumberFormatException("Invalid color format!");
|
||||
if (val.length() != 8) throw new NumberFormatException("Invalid color format: '" + val + "'!");
|
||||
val = val.substring(6, 8) + val.substring(0, 6); // move alpha to front
|
||||
return Integer.parseUnsignedInt(val, 16);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user