Fix broken test for IslandRespawnListener

This commit is contained in:
tastybento 2023-02-04 10:37:02 -08:00
parent ea6ca3d26b
commit 7040047fcb
2 changed files with 2 additions and 1 deletions

View File

@ -69,7 +69,7 @@ public class IslandRespawnListener extends FlagListener {
if (respawnLocation != null) {
e.setRespawnLocation(respawnLocation);
// 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) {
ownerName = BentoBox.getInstance().getPlayers().getName(island.getOwner());
}

View File

@ -88,6 +88,7 @@ public class IslandRespawnListenerTest {
when(player.getUniqueId()).thenReturn(UUID.randomUUID());
when(player.getLocation()).thenReturn(mock(Location.class));
when(player.getServer()).thenReturn(server);
when(player.getName()).thenReturn("tasty");
// Island World Manager
// All locations are in world by default