Skip to content

Commit d8424de

Browse files
Copilottastybento
andcommitted
Add exception handling to homeTeleportAsync for safe location check failures
Agent-Logs-Url: https://github.com/BentoBoxWorld/BentoBox/sessions/575ad09c-95f5-40e0-8f1f-1bd8c8dfacd6 Co-authored-by: tastybento <4407265+tastybento@users.noreply.github.com>
1 parent dfe5c2a commit d8424de

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/world/bentobox/bentobox/managers/IslandsManager.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1913,6 +1913,11 @@ public CompletableFuture<Void> homeTeleportAsync(Island island, User user, boole
19131913
goingHome.remove(user.getUniqueId());
19141914
}).buildFuture().thenAccept(b -> result.complete(null));
19151915
}
1916+
}).exceptionally(e -> {
1917+
plugin.logError("Error checking safe location for " + user.getName() + ": " + e.getMessage());
1918+
goingHome.remove(user.getUniqueId());
1919+
result.complete(null);
1920+
return null;
19161921
});
19171922
return result;
19181923
}

0 commit comments

Comments
 (0)