diff --git a/src/main/java/world/bentobox/challenges/ChallengesManager.java b/src/main/java/world/bentobox/challenges/ChallengesManager.java index 3782c83..a073dbd 100644 --- a/src/main/java/world/bentobox/challenges/ChallengesManager.java +++ b/src/main/java/world/bentobox/challenges/ChallengesManager.java @@ -435,7 +435,7 @@ public class ChallengesManager Iterator entryIterator = cachedData.getHistory().iterator(); - while (this.shouldBeRemoved(entryIterator.next(), survivalTime)) + while (entryIterator.hasNext() && this.shouldBeRemoved(entryIterator.next(), survivalTime)) { entryIterator.remove(); }