Skip to content

Commit

Permalink
Merge pull request #2597 from BentoBoxWorld/2596_no_home_npe
Browse files Browse the repository at this point in the history
Prevent NPE if player has no home island
  • Loading branch information
tastybento authored Jan 14, 2025
2 parents c910247 + 1dd0fb5 commit 6d2e729
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,8 @@ public Location getHomeLocation(@NonNull World world, @NonNull User user) {
*/
@Nullable
public Location getHomeLocation(@NonNull World world, @NonNull UUID uuid) {
return this.getPrimaryIsland(world, uuid).getHome("");
Island is = this.getPrimaryIsland(world, uuid);
return is == null ? null : is.getHome("");
}

/**
Expand Down

0 comments on commit 6d2e729

Please sign in to comment.