mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-25 13:30:08 +00:00
fix teleport after world creation
This commit is contained in:
1 file changed
+9
-1
@@ -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) {
|
||||||
|
|||||||
Reference in new issue
Block a user