mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-01 23:47:21 +00:00
fix a few sync teleports
This commit is contained in:
parent
fa3e35f702
commit
c8eab22427
@ -551,7 +551,7 @@ public class Iris extends VolmitPlugin implements Listener {
|
||||
J.s(() -> {
|
||||
for (Player i : getServer().getOnlinePlayers()) {
|
||||
i.setGameMode(GameMode.SPECTATOR);
|
||||
i.teleport(new Location(w, 0, 200, 0));
|
||||
platform.teleportAsync(i, new Location(w, 0, 200, 0));
|
||||
}
|
||||
});
|
||||
});
|
||||
|
@ -637,8 +637,9 @@ public class CommandStudio implements DecreeExecutor {
|
||||
}
|
||||
|
||||
sender().sendMessage(C.GREEN + "Sending you to the studio world!");
|
||||
player().teleport(Iris.service(StudioSVC.class).getActiveProject().getActiveProvider().getTarget().getWorld().spawnLocation());
|
||||
player().setGameMode(GameMode.SPECTATOR);
|
||||
Player player = player();
|
||||
Iris.platform.teleportAsync(player, Iris.service(StudioSVC.class).getActiveProject().getActiveProvider().getTarget().getWorld().spawnLocation());
|
||||
Iris.platform.getEntityScheduler(player).run(() -> player.setGameMode(GameMode.SPECTATOR), null);
|
||||
}
|
||||
|
||||
@Decree(description = "Update your dimension projects VSCode workspace")
|
||||
|
@ -755,7 +755,7 @@ public class VisionGUI extends JPanel implements MouseWheelListener, KeyListener
|
||||
int xx = (int) getWorldX(hx);
|
||||
int zz = (int) getWorldZ(hz);
|
||||
int h = engine.getComplex().getRoundedHeighteightStream().get(xx, zz);
|
||||
player.teleport(new Location(player.getWorld(), xx, h, zz));
|
||||
Iris.platform.teleportAsync(player, new Location(player.getWorld(), xx, h, zz));
|
||||
notify("Teleporting to " + xx + ", " + h + ", " + zz);
|
||||
} else {
|
||||
notify("No player in world, can't teleport.");
|
||||
|
@ -184,9 +184,7 @@ public class IrisCreator {
|
||||
done.set(true);
|
||||
|
||||
if (sender.isPlayer() && !benchmark) {
|
||||
J.s(() -> {
|
||||
sender.player().teleport(new Location(world.get(), 0, world.get().getHighestBlockYAt(0, 0), 0));
|
||||
});
|
||||
J.s(() -> Iris.platform.teleportAsync(sender.player(), new Location(world.get(), 0, world.get().getHighestBlockYAt(0, 0), 0)));
|
||||
}
|
||||
|
||||
if (studio || benchmark) {
|
||||
|
@ -195,7 +195,7 @@ public class IrisToolbelt {
|
||||
if (!i.getName().equals(world.getName())) {
|
||||
for (Player j : world.getPlayers()) {
|
||||
new VolmitSender(j, Iris.instance.getTag()).sendMessage("You have been evacuated from this world.");
|
||||
j.teleport(i.getSpawnLocation());
|
||||
Iris.platform.teleportAsync(j, i.getSpawnLocation());
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -217,7 +217,7 @@ public class IrisToolbelt {
|
||||
if (!i.getName().equals(world.getName())) {
|
||||
for (Player j : world.getPlayers()) {
|
||||
new VolmitSender(j, Iris.instance.getTag()).sendMessage("You have been evacuated from this world. " + m);
|
||||
j.teleport(i.getSpawnLocation());
|
||||
Iris.platform.teleportAsync(j, i.getSpawnLocation());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
@ -476,8 +476,8 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
|
||||
e.setCancelled(true);
|
||||
warmupAreaAsync(e.getPlayer(), e.getTo(), () -> J.s(() -> {
|
||||
ignoreTP.set(true);
|
||||
e.getPlayer().teleport(e.getTo(), e.getCause());
|
||||
ignoreTP.set(false);
|
||||
Iris.platform.teleportAsync(e.getPlayer(), e.getTo(), e.getCause())
|
||||
.thenRun(() -> ignoreTP.set(false));
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user