Skip to content

Commit

Permalink
Fix failing test. Make player default to being on island.
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Apr 16, 2022
1 parent 80f7480 commit aff6fce
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public boolean canExecute(User user, String label, List<String> args)
Utils.sendMessage(user, user.getTranslation("challenges.errors.no-challenges-admin",
"[command]",
topLabel + " " + this.<ChallengesAddon>getAddon().getChallengesSettings().getAdminMainCommand().split(" ")[0]));

}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,8 @@ public void setUp() throws Exception {
// 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);
Expand Down

0 comments on commit aff6fce

Please sign in to comment.