Async chunk loading on teleport

This commit is contained in:
mathias 2019-08-01 17:25:44 +03:00
parent ba96a23aa5
commit 5186696d1c
2 changed files with 3 additions and 3 deletions

View file

@ -25,7 +25,7 @@ class CommandSpawn implements CommandExecutor {
if (!coordBlock.getType().isSolid() &&
!coordBlock.getRelative(BlockFace.UP).getType().isSolid()) {
player.teleport(yLocation);
player.teleportAsync(yLocation);
break;
}
}

View file

@ -68,7 +68,7 @@ class PlayerDamage implements Listener {
}
if (player.getBedSpawnLocation() != null) {
player.teleport(player.getBedSpawnLocation());
player.teleportAsync(player.getBedSpawnLocation());
} else {
final World world = Bukkit.getWorld("world");
final Location spawnLoc = world.getSpawnLocation();
@ -79,7 +79,7 @@ class PlayerDamage implements Listener {
if (!coordBlock.getType().isSolid() &&
!coordBlock.getRelative(BlockFace.UP).getType().isSolid()) {
player.teleport(yLocation);
player.teleportAsync(yLocation);
return;
}
}