SPIGOT-4363: Bad colours in leather armor

This commit is contained in:
md_5 2018-09-11 20:44:34 +10:00
parent 953e1d601a
commit 1cead6280f

View File

@ -36,7 +36,11 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta {
if (tag.hasKey(DISPLAY.NBT)) {
NBTTagCompound display = tag.getCompound(DISPLAY.NBT);
if (display.hasKey(COLOR.NBT)) {
try {
color = Color.fromRGB(display.getInt(COLOR.NBT));
} catch (IllegalArgumentException ex) {
// Invalid colour
}
}
}
}