Writes a home location for the player after a teleport

Should help with teleporting after death. Previously some situations the
home was set, but not all.

https://github.com/BentoBoxWorld/BentoBox/issues/728#issuecomment-499433751
This commit is contained in:
tastybento 2019-06-06 13:23:40 -07:00
parent 7b2e8a657e
commit 9da79f3bc2

View File

@ -634,6 +634,10 @@ public class IslandsManager {
home.getChunk().load();
}
player.teleport(home);
// Add home
if (plugin.getPlayers().getHomeLocations(world, player.getUniqueId()).isEmpty()) {
plugin.getPlayers().setHomeLocation(player.getUniqueId(), home);
}
if (number == 1) {
user.sendMessage("commands.island.go.teleport");
} else {