mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-08-16 16:26:12 +00:00
fix teleport after world creation
This commit is contained in:
parent
dc8cf0ad38
commit
aaf2f2f8a6
@ -183,7 +183,15 @@ public class IrisCreator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (sender.isPlayer() && !benchmark) {
|
if (sender.isPlayer() && !benchmark) {
|
||||||
J.s(() -> Iris.platform.teleportAsync(sender.player(), new Location(world, 0, world.getHighestBlockYAt(0, 0), 0)));
|
Iris.platform.getRegionScheduler()
|
||||||
|
.run(world, 0, 0, () -> world.getHighestBlockYAt(0, 0) + 1)
|
||||||
|
.getResult()
|
||||||
|
.thenAccept(y -> Iris.platform.teleportAsync(sender.player(), new Location(world, 0, y, 0)))
|
||||||
|
.exceptionally(err -> {
|
||||||
|
sender.sendMessage(C.RED + "Failed to teleport you to the world!");
|
||||||
|
err.printStackTrace();
|
||||||
|
return null;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (studio || benchmark) {
|
if (studio || benchmark) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user