mirror of
https://github.com/BentoBoxWorld/Challenges.git
synced 2024-11-22 18:46:39 +01:00
Fix failing test. Make player default to being on island.
This commit is contained in:
parent
80f748070e
commit
aff6fcec22
@ -50,7 +50,6 @@ public class ChallengesPlayerCommand extends CompositeCommand
|
|||||||
Utils.sendMessage(user, user.getTranslation("challenges.errors.no-challenges-admin",
|
Utils.sendMessage(user, user.getTranslation("challenges.errors.no-challenges-admin",
|
||||||
"[command]",
|
"[command]",
|
||||||
topLabel + " " + this.<ChallengesAddon>getAddon().getChallengesSettings().getAdminMainCommand().split(" ")[0]));
|
topLabel + " " + this.<ChallengesAddon>getAddon().getChallengesSettings().getAdminMainCommand().split(" ")[0]));
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -159,6 +159,8 @@ public class ChallengesCommandTest {
|
|||||||
// Island
|
// Island
|
||||||
when(plugin.getIslands()).thenReturn(im);
|
when(plugin.getIslands()).thenReturn(im);
|
||||||
when(im.getIsland(any(), any(User.class))).thenReturn(island);
|
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
|
// Util
|
||||||
PowerMockito.mockStatic(Util.class, Mockito.RETURNS_MOCKS);
|
PowerMockito.mockStatic(Util.class, Mockito.RETURNS_MOCKS);
|
||||||
|
Loading…
Reference in New Issue
Block a user