diff --git a/src/main/java/world/bentobox/challenges/commands/ChallengesPlayerCommand.java b/src/main/java/world/bentobox/challenges/commands/ChallengesPlayerCommand.java index 882d164..fe2fd6e 100644 --- a/src/main/java/world/bentobox/challenges/commands/ChallengesPlayerCommand.java +++ b/src/main/java/world/bentobox/challenges/commands/ChallengesPlayerCommand.java @@ -50,7 +50,6 @@ public class ChallengesPlayerCommand extends CompositeCommand Utils.sendMessage(user, user.getTranslation("challenges.errors.no-challenges-admin", "[command]", topLabel + " " + this.getAddon().getChallengesSettings().getAdminMainCommand().split(" ")[0])); - } else { diff --git a/src/test/java/world/bentobox/challenges/commands/ChallengesCommandTest.java b/src/test/java/world/bentobox/challenges/commands/ChallengesCommandTest.java index 9c1b9c1..11182ea 100644 --- a/src/test/java/world/bentobox/challenges/commands/ChallengesCommandTest.java +++ b/src/test/java/world/bentobox/challenges/commands/ChallengesCommandTest.java @@ -159,6 +159,8 @@ public class ChallengesCommandTest { // Island when(plugin.getIslands()).thenReturn(im); when(im.getIsland(any(), any(User.class))).thenReturn(island); + // Default to player being on the island + when(im.locationIsOnIsland(any(Player.class), any())).thenReturn(true); // Util PowerMockito.mockStatic(Util.class, Mockito.RETURNS_MOCKS);