From 9b31520684d035cdccfc8fe7091165e0559678f2 Mon Sep 17 00:00:00 2001 From: Glitchfinder Date: Tue, 8 Jan 2013 14:39:08 -0800 Subject: [PATCH] Basic error check for backwards compatibility with dye colors. --- src/main/java/com/gmail/nossr50/skills/mining/Mining.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/skills/mining/Mining.java b/src/main/java/com/gmail/nossr50/skills/mining/Mining.java index 4e2b2408c..8f60987a8 100644 --- a/src/main/java/com/gmail/nossr50/skills/mining/Mining.java +++ b/src/main/java/com/gmail/nossr50/skills/mining/Mining.java @@ -246,7 +246,12 @@ public class Mining { case LAPIS_ORE: if (config.getLapisDoubleDropsEnabled()) { - item = (new MaterialData(Material.INK_SACK, DyeColor.BLUE.getDyeData())).toItemStack(1); + try { + item = (new MaterialData(Material.INK_SACK, DyeColor.BLUE.getDyeData())).toItemStack(1); + } + catch(Exception e) { + item = (new MaterialData(Material.INK_SACK, (byte) 4)).toItemStack(1); + } Misc.dropItems(location, item, 4); Misc.randomDropItems(location, item, 50, 4);