Skip to content

Commit

Permalink
Prevent NPE if player has no home island
Browse files Browse the repository at this point in the history
  • Loading branch information
tastybento committed Jan 14, 2025
1 parent c910247 commit 1dd0fb5
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 1dd0fb5

Please sign in to comment.