diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java index 5478e9bc..f321d854 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java @@ -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)) { - color = Color.fromRGB(display.getInt(COLOR.NBT)); + try { + color = Color.fromRGB(display.getInt(COLOR.NBT)); + } catch (IllegalArgumentException ex) { + // Invalid colour + } } } } |