Merge branch '2531_command_button_panel' into 2534_new_island_scaling

This commit is contained in:
tastybento 2024-10-20 17:59:56 -07:00
commit 801af3d592
4 changed files with 9 additions and 11 deletions

10
pom.xml
View File

@ -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>
@ -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>
@ -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>

View File

@ -8,7 +8,6 @@ import static org.mockito.ArgumentMatchers.anyString;
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;
@ -39,7 +38,6 @@ import org.powermock.reflect.Whitebox;
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;
@ -200,12 +198,8 @@ public class IslandHomesCommandTest {
*/
@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());
}
}

View File

@ -139,6 +139,7 @@ public class IslandCreationPanelTest {
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);

View File

@ -108,6 +108,7 @@ public class LanguagePanelTest {
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);
@ -139,8 +140,6 @@ public class LanguagePanelTest {
}
/**
*/
@After
public void tearDown() {
User.clearUsers();