mirror of
https://github.com/kaboomserver/extras.git
synced 2024-11-27 09:55:36 -05:00
Async chunk loading on teleport
This commit is contained in:
parent
ba96a23aa5
commit
5186696d1c
2 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue