Skip to content

Commit

Permalink
fix: Fix NullPointerException when using portals
Browse files Browse the repository at this point in the history
  • Loading branch information
SpraxDev committed Mar 27, 2024
1 parent 2a2886e commit 211e6a0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/com/craftaro/skyblock/island/IslandManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -1509,9 +1509,10 @@ public void loadPlayer(Player player) {

Bukkit.getScheduler().runTask(this.plugin, () -> {
if (configLoad.getBoolean("Island.WorldBorder.Enable") && island.isBorder()) {
SWorldBorder.send(player, island.getBorderColor(), island.getSize(),
island.getLocation(worldManager.getIslandWorld(player.getWorld()),
IslandEnvironment.ISLAND).clone().add(increment, 0, increment));
Location islandLocation = island.getLocation(worldManager.getIslandWorld(player.getWorld()), IslandEnvironment.ISLAND);
if (islandLocation != null) {
SWorldBorder.send(player, island.getBorderColor(), island.getSize(), islandLocation.clone().add(increment, 0, increment));
}
} else {
SWorldBorder.send(player, null, 1.4999992E7D, new org.bukkit.Location(player.getWorld(), 0, 0, 0));
}
Expand Down

0 comments on commit 211e6a0

Please sign in to comment.