From 18c459de8d63504a1db87b92167c7fe8896cf47c Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Tue, 11 Sep 2018 20:44:34 +1000 Subject: [PATCH] SPIGOT-4363: Bad colours in leather armor By: md_5 --- .../bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java index 5478e9bc7e..f321d854d4 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java +++ b/paper-server/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 + } } } }