SPIGOT-4363: Bad colours in leather armor
By: md_5 <git@md-5.net>
This commit is contained in:
parent
41347a700a
commit
18c459de8d
1 changed files with 5 additions and 1 deletions
|
@ -36,7 +36,11 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta {
|
||||||
if (tag.hasKey(DISPLAY.NBT)) {
|
if (tag.hasKey(DISPLAY.NBT)) {
|
||||||
NBTTagCompound display = tag.getCompound(DISPLAY.NBT);
|
NBTTagCompound display = tag.getCompound(DISPLAY.NBT);
|
||||||
if (display.hasKey(COLOR.NBT)) {
|
if (display.hasKey(COLOR.NBT)) {
|
||||||
color = Color.fromRGB(display.getInt(COLOR.NBT));
|
try {
|
||||||
|
color = Color.fromRGB(display.getInt(COLOR.NBT));
|
||||||
|
} catch (IllegalArgumentException ex) {
|
||||||
|
// Invalid colour
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue