mirror of
https://github.com/kaboomserver/extras.git
synced 2024-12-02 12:16:59 -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() &&
|
if (!coordBlock.getType().isSolid() &&
|
||||||
!coordBlock.getRelative(BlockFace.UP).getType().isSolid()) {
|
!coordBlock.getRelative(BlockFace.UP).getType().isSolid()) {
|
||||||
player.teleport(yLocation);
|
player.teleportAsync(yLocation);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ class PlayerDamage implements Listener {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (player.getBedSpawnLocation() != null) {
|
if (player.getBedSpawnLocation() != null) {
|
||||||
player.teleport(player.getBedSpawnLocation());
|
player.teleportAsync(player.getBedSpawnLocation());
|
||||||
} else {
|
} else {
|
||||||
final World world = Bukkit.getWorld("world");
|
final World world = Bukkit.getWorld("world");
|
||||||
final Location spawnLoc = world.getSpawnLocation();
|
final Location spawnLoc = world.getSpawnLocation();
|
||||||
|
@ -79,7 +79,7 @@ class PlayerDamage implements Listener {
|
||||||
|
|
||||||
if (!coordBlock.getType().isSolid() &&
|
if (!coordBlock.getType().isSolid() &&
|
||||||
!coordBlock.getRelative(BlockFace.UP).getType().isSolid()) {
|
!coordBlock.getRelative(BlockFace.UP).getType().isSolid()) {
|
||||||
player.teleport(yLocation);
|
player.teleportAsync(yLocation);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue