mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-25 01:21:21 +01:00
Fix broken test for IslandRespawnListener
This commit is contained in:
parent
ea6ca3d26b
commit
7040047fcb
@ -69,7 +69,7 @@ public class IslandRespawnListener extends FlagListener {
|
|||||||
if (respawnLocation != null) {
|
if (respawnLocation != null) {
|
||||||
e.setRespawnLocation(respawnLocation);
|
e.setRespawnLocation(respawnLocation);
|
||||||
// Get the island owner name
|
// Get the island owner name
|
||||||
Island island = BentoBox.getInstance().getIslandsManager().getIsland(w, User.getInstance(e.getPlayer()));
|
Island island = BentoBox.getInstance().getIslands().getIsland(w, User.getInstance(e.getPlayer()));
|
||||||
if (island != null) {
|
if (island != null) {
|
||||||
ownerName = BentoBox.getInstance().getPlayers().getName(island.getOwner());
|
ownerName = BentoBox.getInstance().getPlayers().getName(island.getOwner());
|
||||||
}
|
}
|
||||||
|
@ -88,6 +88,7 @@ public class IslandRespawnListenerTest {
|
|||||||
when(player.getUniqueId()).thenReturn(UUID.randomUUID());
|
when(player.getUniqueId()).thenReturn(UUID.randomUUID());
|
||||||
when(player.getLocation()).thenReturn(mock(Location.class));
|
when(player.getLocation()).thenReturn(mock(Location.class));
|
||||||
when(player.getServer()).thenReturn(server);
|
when(player.getServer()).thenReturn(server);
|
||||||
|
when(player.getName()).thenReturn("tasty");
|
||||||
|
|
||||||
// Island World Manager
|
// Island World Manager
|
||||||
// All locations are in world by default
|
// All locations are in world by default
|
||||||
|
Loading…
Reference in New Issue
Block a user