diff --git a/TwosideKeeper.jar b/TwosideKeeper.jar index 43be9cd..7194395 100644 Binary files a/TwosideKeeper.jar and b/TwosideKeeper.jar differ diff --git a/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java b/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java index b5b38db..e6bb2cf 100644 --- a/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java +++ b/src/sig/plugin/TwosideKeeper/HelperStructures/Common/GenericFunctions.java @@ -120,6 +120,9 @@ public class GenericFunctions { return breakObscureHardenedItem(item); } else { lore.set(i, ChatColor.GRAY+"Breaks Remaining: "+ChatColor.YELLOW+(break_count-1)); + if ((break_count-1)<0) { + break_count=0; + } TwosideKeeper.log("Setting breaks remaining to "+(break_count-1),3); } } @@ -154,7 +157,7 @@ public class GenericFunctions { public static ItemStack convertArtifactToDust(ItemStack item) { //Add one line of lore to indicate it's broken dust. - item = addHardenedItemBreaks(item,1); + item = addObscureHardenedItemBreaks(item,1); ItemMeta m = item.getItemMeta(); List oldlore = m.getLore(); oldlore.add(0,ChatColor.DARK_BLUE+""+ChatColor.MAGIC+item.getType()); @@ -181,29 +184,39 @@ public class GenericFunctions { public static ItemStack convertArtifactDustToItem(ItemStack item) { ItemMeta m = item.getItemMeta(); + long time = TwosideKeeper.getServerTickTime(); List oldlore = m.getLore(); - Material gettype = Material.valueOf(ChatColor.stripColor(oldlore.get(0))); - oldlore.remove(6); - oldlore.remove(5); - oldlore.remove(4); - oldlore.remove(3); - oldlore.remove(2); - oldlore.remove(1); - oldlore.remove(0); - for (int i=0;i6) {break_count=6;} lore.set(break_line, ChatColor.GRAY+"Breaks Remaining: "+ChatColor.MAGIC+(break_count)); + if ((break_count)<0) { + break_count=0; + } TwosideKeeper.log("Setting breaks remaining to "+(break_count),3); m.setLore(lore); item.setItemMeta(m); @@ -394,6 +411,9 @@ public class GenericFunctions { } if (break_count>5) {break_count=5;} lore.set(break_line, ChatColor.GRAY+"Breaks Remaining: "+ChatColor.MAGIC+(break_count)); + if ((break_count)<0) { + break_count=0; + } TwosideKeeper.log("Setting breaks remaining to "+(break_count),3); m.setLore(lore); item.setItemMeta(m);