From 0995d23a3db8427a10c85b7bdf97634bfd912245 Mon Sep 17 00:00:00 2001 From: HappyPikachu Date: Thu, 23 Jun 2016 21:34:35 -0400 Subject: [PATCH] Debug build for #352 --- src/main/java/me/blackvein/quests/Quester.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/me/blackvein/quests/Quester.java b/src/main/java/me/blackvein/quests/Quester.java index e9bd9c780..467488cbc 100644 --- a/src/main/java/me/blackvein/quests/Quester.java +++ b/src/main/java/me/blackvein/quests/Quester.java @@ -1207,7 +1207,8 @@ public class Quester { public void reachLocation(Quest quest, Location l) { for (Location location : getQuestData(quest).locationsReached) { - + //debug try/catch for #352 + try { int index = getQuestData(quest).locationsReached.indexOf(location); Location locationToReach = getCurrentStage(quest).locationsToReach.get(index); double radius = getQuestData(quest).radiiToReachWithin.get(index); @@ -1229,6 +1230,12 @@ public class Quester { } } + } catch (IndexOutOfBoundsException e) { + System.out.println("An error has occurred with Quests. Please report on Github. Include the info below"); + System.out.println("index = " + getQuestData(quest).locationsReached.indexOf(location)); + System.out.println("locationsReached = " + getQuestData(quest).locationsReached.toString()); + e.printStackTrace(); + } }