diff --git a/src/test/java/bskyblock/TestBSkyBlock.java b/src/test/java/bskyblock/TestBSkyBlock.java index b980eb242..b30f67fbf 100644 --- a/src/test/java/bskyblock/TestBSkyBlock.java +++ b/src/test/java/bskyblock/TestBSkyBlock.java @@ -166,6 +166,7 @@ public class TestBSkyBlock { Bukkit.getLogger().info("SETUP: member UUID = " + MEMBER_UUID); Bukkit.getLogger().info("SETUP: visitor UUID = " + VISITOR_UUID); Mockito.when(im.getIslandAt(Matchers.any())).thenReturn(Optional.of(island)); + when(im.getProtectedIslandAt(Mockito.any())).thenReturn(Optional.of(island)); Settings settings = mock(Settings.class); Mockito.when(plugin.getSettings()).thenReturn(settings); diff --git a/src/test/java/us/tastybento/bskyblock/listeners/flags/FireListenerTest.java b/src/test/java/us/tastybento/bskyblock/listeners/flags/FireListenerTest.java index be481ae14..9e8221821 100644 --- a/src/test/java/us/tastybento/bskyblock/listeners/flags/FireListenerTest.java +++ b/src/test/java/us/tastybento/bskyblock/listeners/flags/FireListenerTest.java @@ -412,6 +412,7 @@ public class FireListenerTest { when(plugin.getIslands()).thenReturn(im); Island island = mock(Island.class); when(im.getIslandAt(Matchers.any())).thenReturn(Optional.of(island)); + when(im.getProtectedIslandAt(Mockito.any())).thenReturn(Optional.of(island)); // Block on fire Block block = mock(Block.class); @@ -482,7 +483,7 @@ public class FireListenerTest { assertFalse(listener.onTNTDamage(e)); // Check with no island - when(im.getIslandAt(Matchers.any())).thenReturn(Optional.empty()); + when(im.getProtectedIslandAt(Matchers.any())).thenReturn(Optional.empty()); // BREAK_BLOCKS spread is not allowed, so should be cancelled Flags.BREAK_BLOCKS.setDefaultSetting(false); assertTrue(listener.onTNTDamage(e)); diff --git a/src/test/java/us/tastybento/bskyblock/listeners/flags/PVPListenerTest.java b/src/test/java/us/tastybento/bskyblock/listeners/flags/PVPListenerTest.java index a843a5bee..d6e79afb0 100644 --- a/src/test/java/us/tastybento/bskyblock/listeners/flags/PVPListenerTest.java +++ b/src/test/java/us/tastybento/bskyblock/listeners/flags/PVPListenerTest.java @@ -155,6 +155,7 @@ public class PVPListenerTest { when(im.userIsOnIsland(Mockito.any(), Mockito.any())).thenReturn(true); island = mock(Island.class); when(im.getIslandAt(Mockito.any())).thenReturn(Optional.of(island)); + when(im.getProtectedIslandAt(Mockito.any())).thenReturn(Optional.of(island)); // All flags are disallowed by default. when(island.isAllowed(Mockito.any())).thenReturn(false); when(plugin.getIslands()).thenReturn(im);