diff --git a/src/main/java/com/gmail/nossr50/skills/archery/Archery.java b/src/main/java/com/gmail/nossr50/skills/archery/Archery.java index 4d21f8628..b261731a1 100644 --- a/src/main/java/com/gmail/nossr50/skills/archery/Archery.java +++ b/src/main/java/com/gmail/nossr50/skills/archery/Archery.java @@ -56,12 +56,12 @@ public class Archery { * @param entity The entity hit by the arrows */ public static void arrowRetrievalCheck(LivingEntity livingEntity) { - for (Iterator it = trackedEntities.iterator() ; it.hasNext() ; ) { - TrackedEntity trackedEntity = it.next(); + for (Iterator entityIterator = trackedEntities.iterator(); entityIterator.hasNext(); ) { + TrackedEntity trackedEntity = entityIterator.next(); - if (trackedEntity.getLivingEntity() == livingEntity) { + if (trackedEntity.getLivingEntity().getEntityId() == livingEntity.getEntityId()) { Misc.dropItems(livingEntity.getLocation(), new ItemStack(Material.ARROW), trackedEntity.getArrowCount()); - it.remove(); + entityIterator.remove(); return; } } diff --git a/src/main/java/com/gmail/nossr50/skills/gathering/Fishing.java b/src/main/java/com/gmail/nossr50/skills/gathering/Fishing.java index 2252cd48f..16098a2fe 100755 --- a/src/main/java/com/gmail/nossr50/skills/gathering/Fishing.java +++ b/src/main/java/com/gmail/nossr50/skills/gathering/Fishing.java @@ -403,14 +403,14 @@ public class Fishing { } break; - case SQUID: + case SQUID: ItemStack item; try { item = (new MaterialData(Material.INK_SACK, DyeColor.BLACK.getDyeData())).toItemStack(1); } catch(Exception e) { item = (new MaterialData(Material.INK_SACK, (byte) 0)).toItemStack(1); - } + } Misc.dropItem(location, item); break;