@@ -220,25 +220,25 @@ public void testIsSafeLocationSubmerged() {
220
220
public void testIsSafeLocationPortals () {
221
221
when (ground .getType ()).thenReturn (Material .STONE );
222
222
when (space1 .getType ()).thenReturn (Material .AIR );
223
- when (space2 .getType ()).thenReturn (Material .PORTAL );
223
+ when (space2 .getType ()).thenReturn (Material .NETHER_PORTAL );
224
224
assertFalse (manager .isSafeLocation (location ));
225
225
when (ground .getType ()).thenReturn (Material .STONE );
226
226
when (space1 .getType ()).thenReturn (Material .AIR );
227
- when (space2 .getType ()).thenReturn (Material .ENDER_PORTAL );
227
+ when (space2 .getType ()).thenReturn (Material .END_PORTAL );
228
228
assertFalse (manager .isSafeLocation (location ));
229
229
when (ground .getType ()).thenReturn (Material .STONE );
230
- when (space1 .getType ()).thenReturn (Material .PORTAL );
230
+ when (space1 .getType ()).thenReturn (Material .NETHER_PORTAL );
231
231
when (space2 .getType ()).thenReturn (Material .AIR );
232
232
assertFalse (manager .isSafeLocation (location ));
233
233
when (ground .getType ()).thenReturn (Material .STONE );
234
- when (space1 .getType ()).thenReturn (Material .ENDER_PORTAL );
234
+ when (space1 .getType ()).thenReturn (Material .END_PORTAL );
235
235
when (space2 .getType ()).thenReturn (Material .AIR );
236
236
assertFalse (manager .isSafeLocation (location ));
237
- when (ground .getType ()).thenReturn (Material .PORTAL );
237
+ when (ground .getType ()).thenReturn (Material .NETHER_PORTAL );
238
238
when (space1 .getType ()).thenReturn (Material .AIR );
239
239
when (space2 .getType ()).thenReturn (Material .AIR );
240
240
assertFalse (manager .isSafeLocation (location ));
241
- when (ground .getType ()).thenReturn (Material .ENDER_PORTAL );
241
+ when (ground .getType ()).thenReturn (Material .END_PORTAL );
242
242
when (space1 .getType ()).thenReturn (Material .AIR );
243
243
when (space2 .getType ()).thenReturn (Material .AIR );
244
244
assertFalse (manager .isSafeLocation (location ));
@@ -261,26 +261,14 @@ public void testIsSafeLocationLava() {
261
261
when (space1 .getType ()).thenReturn (Material .AIR );
262
262
when (space2 .getType ()).thenReturn (Material .LAVA );
263
263
assertFalse ("In lava" , manager .isSafeLocation (location ));
264
- when (ground .getType ()).thenReturn (Material .STATIONARY_LAVA );
265
- when (space1 .getType ()).thenReturn (Material .AIR );
266
- when (space2 .getType ()).thenReturn (Material .AIR );
267
- assertFalse ("In lava" , manager .isSafeLocation (location ));
268
- when (ground .getType ()).thenReturn (Material .AIR );
269
- when (space1 .getType ()).thenReturn (Material .STATIONARY_LAVA );
270
- when (space2 .getType ()).thenReturn (Material .AIR );
271
- assertFalse ("In lava" , manager .isSafeLocation (location ));
272
- when (ground .getType ()).thenReturn (Material .AIR );
273
- when (space1 .getType ()).thenReturn (Material .AIR );
274
- when (space2 .getType ()).thenReturn (Material .STATIONARY_LAVA );
275
- assertFalse ("In lava" , manager .isSafeLocation (location ));
276
264
}
277
265
278
266
/**
279
267
* Test method for {@link world.bentobox.bentobox.managers.IslandsManager#isSafeLocation(org.bukkit.Location)}.
280
268
*/
281
269
@ Test
282
270
public void testTrapDoor () {
283
- when (ground .getType ()).thenReturn (Material .TRAP_DOOR );
271
+ when (ground .getType ()).thenReturn (Material .OAK_TRAPDOOR );
284
272
285
273
// Open trapdoor
286
274
TrapDoor trapDoor = mock (TrapDoor .class );
@@ -309,12 +297,12 @@ public void testBadBlocks() {
309
297
assertFalse ("Fence :" + m .toString (), manager .isSafeLocation (location ));
310
298
});
311
299
// Signs
312
- when (ground .getType ()).thenReturn (Material .SIGN_POST );
300
+ when (ground .getType ()).thenReturn (Material .SIGN );
313
301
assertFalse ("Sign" , manager .isSafeLocation (location ));
314
302
when (ground .getType ()).thenReturn (Material .WALL_SIGN );
315
303
assertFalse ("Sign" , manager .isSafeLocation (location ));
316
304
// Bad Blocks
317
- Material [] badMats = {Material .CACTUS , Material .BOAT };
305
+ Material [] badMats = {Material .CACTUS , Material .OAK_BOAT };
318
306
Arrays .asList (badMats ).forEach (m -> {
319
307
when (ground .getType ()).thenReturn (m );
320
308
assertFalse ("Bad mat :" + m .toString (), manager .isSafeLocation (location ));
@@ -342,12 +330,12 @@ public void testSolidBlocks() {
342
330
when (space2 .getType ()).thenReturn (Material .WALL_SIGN );
343
331
assertTrue ("Wall sign 2" , manager .isSafeLocation (location ));
344
332
345
- when (space1 .getType ()).thenReturn (Material .SIGN_POST );
333
+ when (space1 .getType ()).thenReturn (Material .SIGN );
346
334
when (space2 .getType ()).thenReturn (Material .AIR );
347
335
assertTrue ("Wall sign 1" , manager .isSafeLocation (location ));
348
336
349
337
when (space1 .getType ()).thenReturn (Material .AIR );
350
- when (space2 .getType ()).thenReturn (Material .SIGN_POST );
338
+ when (space2 .getType ()).thenReturn (Material .SIGN );
351
339
assertTrue ("Wall sign 2" , manager .isSafeLocation (location ));
352
340
}
353
341
@@ -456,7 +444,7 @@ public void testGetCount() {
456
444
}
457
445
458
446
/**
459
- * Test method for {@link world.bentobox.bentobox.managers.IslandsManager#getIsland(java.util. UUID)}.
447
+ * Test method for {@link world.bentobox.bentobox.managers.IslandsManager#getIsland(World, UUID)}.
460
448
*/
461
449
@ Test
462
450
public void testGetIsland () {
@@ -497,7 +485,7 @@ public void testGetIslandAtLocation() throws Exception {
497
485
}
498
486
499
487
/**
500
- * Test method for {@link world.bentobox.bentobox.managers.IslandsManager#getIslandLocation(java.util. UUID)}.
488
+ * Test method for {@link world.bentobox.bentobox.managers.IslandsManager#getIslandLocation(World, UUID)}.
501
489
*/
502
490
@ Test
503
491
public void testGetIslandLocation () {
@@ -508,7 +496,7 @@ public void testGetIslandLocation() {
508
496
}
509
497
510
498
/**
511
- * Test method for {@link world.bentobox.bentobox.managers.IslandsManager#getLast()}.
499
+ * Test method for {@link world.bentobox.bentobox.managers.IslandsManager#getLast(World )}.
512
500
*/
513
501
@ Test
514
502
public void testGetLast () {
@@ -519,7 +507,7 @@ public void testGetLast() {
519
507
}
520
508
521
509
/**
522
- * Test method for {@link world.bentobox.bentobox.managers.IslandsManager#getMembers(java.util. UUID)}.
510
+ * Test method for {@link world.bentobox.bentobox.managers.IslandsManager#getMembers(World, UUID)}.
523
511
* @throws Exception
524
512
*/
525
513
@ Test
@@ -572,7 +560,7 @@ public void testGetProtectedIslandAt() throws Exception {
572
560
}
573
561
574
562
/**
575
- * Test method for {@link world.bentobox.bentobox.managers.IslandsManager#getSafeHomeLocation(java.util.UUID , int)}.
563
+ * Test method for {@link world.bentobox.bentobox.managers.IslandsManager#getSafeHomeLocation(World, User , int)}.
576
564
*/
577
565
@ Test
578
566
public void testGetSafeHomeLocation () {
@@ -585,7 +573,7 @@ public void testGetSafeHomeLocation() {
585
573
}
586
574
587
575
/**
588
- * Test method for {@link world.bentobox.bentobox.managers.IslandsManager#getSpawnPoint()}.
576
+ * Test method for {@link world.bentobox.bentobox.managers.IslandsManager#getSpawnPoint(World )}.
589
577
*/
590
578
@ Test
591
579
public void testGetSpawnPoint () {
@@ -602,7 +590,7 @@ public void testGetSpawnPoint() {
602
590
}
603
591
604
592
/**
605
- * Test method for {@link world.bentobox.bentobox.managers.IslandsManager#homeTeleport(org.bukkit.entity. Player, int)}.
593
+ * Test method for {@link world.bentobox.bentobox.managers.IslandsManager#homeTeleport(World, Player, int)}.
606
594
*/
607
595
@ Test
608
596
public void testHomeTeleportPlayerInt () {
@@ -618,7 +606,7 @@ public void testHomeTeleportPlayerInt() {
618
606
}
619
607
620
608
/**
621
- * Test method for {@link world.bentobox.bentobox.managers.IslandsManager#homeTeleport(org.bukkit.entity. Player, int)}.
609
+ * Test method for {@link world.bentobox.bentobox.managers.IslandsManager#homeTeleport(World, Player, int)}.
622
610
*/
623
611
@ Test
624
612
public void testHomeTeleportPlayerIntDifferentGameMode () {
@@ -648,7 +636,7 @@ public void testIsAtSpawn() {
648
636
}
649
637
650
638
/**
651
- * Test method for {@link world.bentobox.bentobox.managers.IslandsManager#isOwner(java.util. UUID)}.
639
+ * Test method for {@link world.bentobox.bentobox.managers.IslandsManager#isOwner(World, UUID)}.
652
640
* @throws Exception
653
641
*/
654
642
@ Test
@@ -753,7 +741,7 @@ public void testUserIsOnIsland() throws Exception {
753
741
}
754
742
755
743
/**
756
- * Test method for {@link world.bentobox.bentobox.managers.IslandsManager#removePlayer(java.util.UUID )}.
744
+ * Test method for {@link world.bentobox.bentobox.managers.IslandsManager#removePlayer(World, User )}.
757
745
*/
758
746
@ Test
759
747
public void testRemovePlayer () {
0 commit comments