Avoid error from extensive reach locations, fixes #1688

This commit is contained in:
PikaMug 2021-05-20 03:58:33 -04:00
parent 60d319f818
commit eff3e14ddb

View File

@ -2610,7 +2610,7 @@ public class Quester implements Comparable<Quester> {
finishObjective(quest, new Objective(type, new ItemStack(Material.AIR, 1),
new ItemStack(Material.AIR, 1)), null, null, null, location, null, null,
null);
} else if (getQuestData(quest).hasReached.get(index) == false) {
} else if (index >= getQuestData(quest).hasReached.size()) {
getQuestData(quest).hasReached.set(index, true);
finishObjective(quest, new Objective(type, new ItemStack(Material.AIR, 1),
new ItemStack(Material.AIR, 1)), null, null, null, location, null, null,