From 1dd0fb539de7dba9d5d1dc6f51fb18368feb6c38 Mon Sep 17 00:00:00 2001 From: tastybento Date: Tue, 14 Jan 2025 15:08:25 -0800 Subject: [PATCH] Prevent NPE if player has no home island --- .../java/world/bentobox/bentobox/managers/IslandsManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/world/bentobox/bentobox/managers/IslandsManager.java b/src/main/java/world/bentobox/bentobox/managers/IslandsManager.java index 30037e739..559245645 100644 --- a/src/main/java/world/bentobox/bentobox/managers/IslandsManager.java +++ b/src/main/java/world/bentobox/bentobox/managers/IslandsManager.java @@ -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(""); } /**