Potential fix for #924

This commit is contained in:
PikaMug 2019-08-27 12:53:55 -04:00
parent d5e050412d
commit dd985ab2c5

View File

@ -1693,6 +1693,9 @@ public class Quester {
int index = 0;
for (Location location : getQuestData(quest).locationsReached) {
try {
if (getCurrentStage(quest).locationsToReach.size() <= index) {
return;
}
Location locationToReach = getCurrentStage(quest).locationsToReach.get(index);
double radius = getQuestData(quest).radiiToReachWithin.get(index);
if (l.getX() < (locationToReach.getX() + radius) && l.getX() > (locationToReach.getX() - radius)) {
@ -1711,6 +1714,7 @@ public class Quester {
}
}
index++;
} catch (IndexOutOfBoundsException e) {
plugin.getLogger().severe("An error has occurred with Quests. Please report on Github. Include the info below");
plugin.getLogger().warning("index = " + index);