mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-10-25 05:50:02 +02:00
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:
parent
7b2e8a657e
commit
9da79f3bc2
@ -634,6 +634,10 @@ public class IslandsManager {
|
|||||||
home.getChunk().load();
|
home.getChunk().load();
|
||||||
}
|
}
|
||||||
player.teleport(home);
|
player.teleport(home);
|
||||||
|
// Add home
|
||||||
|
if (plugin.getPlayers().getHomeLocations(world, player.getUniqueId()).isEmpty()) {
|
||||||
|
plugin.getPlayers().setHomeLocation(player.getUniqueId(), home);
|
||||||
|
}
|
||||||
if (number == 1) {
|
if (number == 1) {
|
||||||
user.sendMessage("commands.island.go.teleport");
|
user.sendMessage("commands.island.go.teleport");
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user