mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2025-07-02 07:56:48 +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(() -> {
|
J.s(() -> {
|
||||||
for (Player i : getServer().getOnlinePlayers()) {
|
for (Player i : getServer().getOnlinePlayers()) {
|
||||||
i.setGameMode(GameMode.SPECTATOR);
|
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!");
|
sender().sendMessage(C.GREEN + "Sending you to the studio world!");
|
||||||
player().teleport(Iris.service(StudioSVC.class).getActiveProject().getActiveProvider().getTarget().getWorld().spawnLocation());
|
Player player = player();
|
||||||
player().setGameMode(GameMode.SPECTATOR);
|
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")
|
@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 xx = (int) getWorldX(hx);
|
||||||
int zz = (int) getWorldZ(hz);
|
int zz = (int) getWorldZ(hz);
|
||||||
int h = engine.getComplex().getRoundedHeighteightStream().get(xx, zz);
|
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);
|
notify("Teleporting to " + xx + ", " + h + ", " + zz);
|
||||||
} else {
|
} else {
|
||||||
notify("No player in world, can't teleport.");
|
notify("No player in world, can't teleport.");
|
||||||
|
@ -184,9 +184,7 @@ public class IrisCreator {
|
|||||||
done.set(true);
|
done.set(true);
|
||||||
|
|
||||||
if (sender.isPlayer() && !benchmark) {
|
if (sender.isPlayer() && !benchmark) {
|
||||||
J.s(() -> {
|
J.s(() -> Iris.platform.teleportAsync(sender.player(), new Location(world.get(), 0, world.get().getHighestBlockYAt(0, 0), 0)));
|
||||||
sender.player().teleport(new Location(world.get(), 0, world.get().getHighestBlockYAt(0, 0), 0));
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (studio || benchmark) {
|
if (studio || benchmark) {
|
||||||
|
@ -195,7 +195,7 @@ public class IrisToolbelt {
|
|||||||
if (!i.getName().equals(world.getName())) {
|
if (!i.getName().equals(world.getName())) {
|
||||||
for (Player j : world.getPlayers()) {
|
for (Player j : world.getPlayers()) {
|
||||||
new VolmitSender(j, Iris.instance.getTag()).sendMessage("You have been evacuated from this world.");
|
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;
|
return true;
|
||||||
@ -217,7 +217,7 @@ public class IrisToolbelt {
|
|||||||
if (!i.getName().equals(world.getName())) {
|
if (!i.getName().equals(world.getName())) {
|
||||||
for (Player j : world.getPlayers()) {
|
for (Player j : world.getPlayers()) {
|
||||||
new VolmitSender(j, Iris.instance.getTag()).sendMessage("You have been evacuated from this world. " + m);
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -476,8 +476,8 @@ public class IrisWorldManager extends EngineAssignedWorldManager {
|
|||||||
e.setCancelled(true);
|
e.setCancelled(true);
|
||||||
warmupAreaAsync(e.getPlayer(), e.getTo(), () -> J.s(() -> {
|
warmupAreaAsync(e.getPlayer(), e.getTo(), () -> J.s(() -> {
|
||||||
ignoreTP.set(true);
|
ignoreTP.set(true);
|
||||||
e.getPlayer().teleport(e.getTo(), e.getCause());
|
Iris.platform.teleportAsync(e.getPlayer(), e.getTo(), e.getCause())
|
||||||
ignoreTP.set(false);
|
.thenRun(() -> ignoreTP.set(false));
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user