mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-21 08:37:50 +01:00
parent
a71eee537d
commit
c03c1e3ecc
@ -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);
|
||||
|
@ -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));
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user