Skip to content

Commit 30612fb

Browse files
committed
Add more logging if teleporting fails
1 parent 4dc222b commit 30612fb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1079,7 +1079,10 @@ private CompletableFuture<Boolean> homeTeleportAsync(@NonNull World world, @NonN
10791079
// Try to fix this teleport location and teleport the player if possible
10801080
new SafeSpotTeleport.Builder(plugin).entity(player).island(island).homeName(name)
10811081
.thenRun(() -> teleported(world, user, name, newIsland, island))
1082-
.ifFail(() -> goingHome.remove(user.getUniqueId())).buildFuture().thenAccept(result::complete);
1082+
.ifFail(() -> {
1083+
plugin.logError(user.getName() + " could not be teleported to home because a safe spot could not be found on island " + island.getCenter());
1084+
goingHome.remove(user.getUniqueId());
1085+
}).buildFuture().thenAccept(result::complete);
10831086
return;
10841087
}
10851088
Util.teleportAsync(Objects.requireNonNull(player), home).thenAccept(b -> {

0 commit comments

Comments
 (0)