Skip to content

Commit

Permalink
Merge branch '2531_command_button_panel' into 2534_new_island_scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Oct 21, 2024
2 parents 6766c0f + 13756cf commit 801af3d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
10 changes: 7 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,12 @@
<distributionManagement>
<snapshotRepository>
<id>codemc-snapshots</id>
<url>https://repo.codemc.org/repository/tastybento/</url>
<url>https://repo.codemc.org/repository/maven-snapshots</url>
</snapshotRepository>
<repository>
<id>codemc-releases</id>
<url>https://repo.codemc.org/repository/maven-releases</url>
</repository>
</distributionManagement>

<properties>
Expand Down Expand Up @@ -84,7 +88,7 @@
<!-- Do not change unless you want different name for local builds. -->
<build.number>-LOCAL</build.number>
<!-- This allows to change between versions. -->
<build.version>2.6.1</build.version>
<build.version>2.6.0</build.version>
<sonar.organization>bentobox-world</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<server.jars>${project.basedir}/lib</server.jars>
Expand Down Expand Up @@ -151,7 +155,7 @@
</repository>
<repository>
<id>codemc-repo</id>
<url>https://repo.codemc.io/repository/tastybento/</url>
<url>https://repo.codemc.org/repository/maven-public</url>
</repository>
<repository>
<id>dynmap-repo</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import static org.mockito.ArgumentMatchers.eq;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;

Expand Down Expand Up @@ -39,7 +38,6 @@
import world.bentobox.bentobox.BentoBox;
import world.bentobox.bentobox.Settings;
import world.bentobox.bentobox.api.commands.CompositeCommand;
import world.bentobox.bentobox.api.localization.TextVariables;
import world.bentobox.bentobox.api.user.User;
import world.bentobox.bentobox.database.objects.Island;
import world.bentobox.bentobox.managers.CommandsManager;
Expand Down Expand Up @@ -200,12 +198,8 @@ public void testCanExecute() {
*/
@Test
public void testExecuteUserStringListOfString() {
when(im.getIslands(world, user)).thenReturn(List.of(island));
IslandHomesCommand isc = new IslandHomesCommand(ic);
assertTrue(isc.canExecute(user, "island", Collections.emptyList()));
assertTrue(isc.execute(user, "island", Collections.emptyList()));
verify(user).sendMessage("commands.island.sethome.homes-are");
verify(user, times(4)).sendMessage(eq("commands.island.sethome.home-list-syntax"), eq(TextVariables.NAME), anyString());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ public void setUp() throws Exception {
when(ic.getAddon()).thenReturn(addon);
World world = mock(World.class);
when(ic.getWorld()).thenReturn(world);
when(ic.getPlugin()).thenReturn(plugin);

// No island for player to begin with (set it later in the tests)
when(im.hasIsland(any(), eq(uuid))).thenReturn(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ public void setUp() throws Exception {

GameModeAddon addon = mock(GameModeAddon.class);
when(command.getAddon()).thenReturn(addon);
when(command.getPlugin()).thenReturn(plugin);
when(addon.getDataFolder()).thenReturn(resourcePath.toFile());

World world = mock(World.class);
Expand Down Expand Up @@ -139,8 +140,6 @@ public void setUp() throws Exception {

}

/**
*/
@After
public void tearDown() {
User.clearUsers();
Expand Down

0 comments on commit 801af3d

Please sign in to comment.