diff --git a/src/main/java/world/bentobox/challenges/tasks/TryToComplete.java b/src/main/java/world/bentobox/challenges/tasks/TryToComplete.java index 05b07e8..e0c2e4f 100644 --- a/src/main/java/world/bentobox/challenges/tasks/TryToComplete.java +++ b/src/main/java/world/bentobox/challenges/tasks/TryToComplete.java @@ -637,7 +637,7 @@ public class TryToComplete private ChallengeResult checkIfCanCompleteChallenge(int maxTimes) { ChallengeResult result; - + ChallengeType type = this.challenge.getChallengeType(); // Check the world if (!this.challenge.isDeployed()) diff --git a/src/test/java/world/bentobox/challenges/tasks/TryToCompleteTest.java b/src/test/java/world/bentobox/challenges/tasks/TryToCompleteTest.java index 2d78a03..9ed9ac1 100644 --- a/src/test/java/world/bentobox/challenges/tasks/TryToCompleteTest.java +++ b/src/test/java/world/bentobox/challenges/tasks/TryToCompleteTest.java @@ -176,6 +176,7 @@ public class TryToCompleteTest { Optional optionalGameMode = Optional.of(gameMode); when(iwm.getAddon(any())).thenReturn(optionalGameMode); when(iwm.getIslandDistance(any())).thenReturn(400); + when(iwm.inWorld(any(World.class))).thenReturn(true); // Island Manager when(addon.getIslands()).thenReturn(im);