Skip to content
This repository was archived by the owner on Nov 11, 2025. It is now read-only.

Commit 680f640

Browse files
committed
No moar tp for yuo, for real this time
1 parent 8cc76b9 commit 680f640

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/main/java/io/github/addoncommunity/galactifun/core/managers/WorldManager.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,12 +230,13 @@ private void onPlayerTeleport(@Nonnull PlayerTeleportEvent e) {
230230
if (e instanceof PlayerTeleportEndGatewayEvent) return;
231231
if (!e.getPlayer().hasPermission("galactifun.admin")) {
232232
if (e.getTo().getWorld() != null && e.getFrom().getWorld() != e.getTo().getWorld()) {
233-
PlanetaryWorld world = getWorld(e.getTo().getWorld());
234-
PlanetaryWorld world2 = getWorld(e.getFrom().getWorld());
233+
PlanetaryWorld fromWorld = getWorld(e.getFrom().getWorld());
234+
PlanetaryWorld toWorld = getWorld(e.getTo().getWorld());
235235
if (
236-
(world != null || world2 != null)
237-
&& !BaseUniverse.EARTH.equals(world)
238-
&& !BaseUniverse.EARTH.equals(world2)
236+
(fromWorld != null || toWorld != null)
237+
&& !BaseUniverse.EARTH.equals(toWorld)
238+
&& !BaseUniverse.EARTH.equals(fromWorld)
239+
|| (BaseUniverse.EARTH.equals(fromWorld) && toWorld != null)
239240
) {
240241
boolean canTp = false;
241242
for (MetadataValue value : e.getPlayer().getMetadata("CanTpAlienWorld")) {

0 commit comments

Comments
 (0)