From ca9c81e47b0a38deb153508786d1bb2c08082843 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sat, 19 Oct 2024 10:51:24 -0700 Subject: [PATCH 1/2] Revert "Update to new codemc repo and version up to 2.6.1" This reverts commit 4cc354eed5c897556351ef7f6d38a5dc37a594a6. --- pom.xml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 6328f605d..e49d241f5 100644 --- a/pom.xml +++ b/pom.xml @@ -52,8 +52,12 @@ codemc-snapshots - https://repo.codemc.org/repository/tastybento/ + https://repo.codemc.org/repository/maven-snapshots + + codemc-releases + https://repo.codemc.org/repository/maven-releases + @@ -84,7 +88,7 @@ -LOCAL - 2.6.1 + 2.6.0 bentobox-world https://sonarcloud.io ${project.basedir}/lib @@ -151,7 +155,7 @@ codemc-repo - https://repo.codemc.io/repository/tastybento/ + https://repo.codemc.org/repository/maven-public dynmap-repo From f9c34e5df676f897434d1c5d8895efdce8729968 Mon Sep 17 00:00:00 2001 From: tastybento Date: Sun, 20 Oct 2024 17:57:59 -0700 Subject: [PATCH 2/2] Test fixes --- .../api/commands/island/IslandHomesCommandTest.java | 6 ------ .../panels/customizable/IslandCreationPanelTest.java | 1 + .../bentobox/panels/customizable/LanguagePanelTest.java | 3 +-- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/test/java/world/bentobox/bentobox/api/commands/island/IslandHomesCommandTest.java b/src/test/java/world/bentobox/bentobox/api/commands/island/IslandHomesCommandTest.java index a5702fcb9..9d32760f9 100644 --- a/src/test/java/world/bentobox/bentobox/api/commands/island/IslandHomesCommandTest.java +++ b/src/test/java/world/bentobox/bentobox/api/commands/island/IslandHomesCommandTest.java @@ -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; @@ -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; @@ -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()); } } diff --git a/src/test/java/world/bentobox/bentobox/panels/customizable/IslandCreationPanelTest.java b/src/test/java/world/bentobox/bentobox/panels/customizable/IslandCreationPanelTest.java index 9931a7642..0f8bb9433 100644 --- a/src/test/java/world/bentobox/bentobox/panels/customizable/IslandCreationPanelTest.java +++ b/src/test/java/world/bentobox/bentobox/panels/customizable/IslandCreationPanelTest.java @@ -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); diff --git a/src/test/java/world/bentobox/bentobox/panels/customizable/LanguagePanelTest.java b/src/test/java/world/bentobox/bentobox/panels/customizable/LanguagePanelTest.java index 94adc7e89..2a2ad5526 100644 --- a/src/test/java/world/bentobox/bentobox/panels/customizable/LanguagePanelTest.java +++ b/src/test/java/world/bentobox/bentobox/panels/customizable/LanguagePanelTest.java @@ -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); @@ -139,8 +140,6 @@ public void setUp() throws Exception { } - /** - */ @After public void tearDown() { User.clearUsers();