Fix error on move event when not in an island world.

This commit is contained in:
Brianna 2019-08-31 11:45:06 -04:00
parent c21ad9c2e1
commit 99de1ccf5b

View File

@ -202,8 +202,7 @@ public class Move implements Listener {
} }
// Load the island they are now on if one exists // Load the island they are now on if one exists
if (player.hasPermission("fabledskyblock.bypass") if (player.hasPermission("fabledskyblock.bypass")) {
|| islandManager.getIslandAtLocation(player.getLocation()).isAlwaysLoaded()) {
Island loadedIsland = islandManager.loadIslandAtLocation(player.getLocation()); Island loadedIsland = islandManager.loadIslandAtLocation(player.getLocation());
if (loadedIsland != null) { if (loadedIsland != null) {
playerData.setIsland(loadedIsland.getOwnerUUID()); playerData.setIsland(loadedIsland.getOwnerUUID());
@ -211,6 +210,7 @@ public class Move implements Listener {
} }
} }
LocationUtil.teleportPlayerToSpawn(player); LocationUtil.teleportPlayerToSpawn(player);
messageManager.sendMessage(player, messageManager.sendMessage(player,