Stops measuring distances across worlds
All checks were successful
EpicKnarvik97/Stargate/pipeline/head This commit looks good
All checks were successful
EpicKnarvik97/Stargate/pipeline/head This commit looks good
This commit is contained in:
@@ -79,6 +79,7 @@ public class StargateTeleportListener implements Listener {
|
||||
// Cancel end gateway teleportation to the same destination
|
||||
if (event.getTo() != null && cause == PlayerTeleportEvent.TeleportCause.END_GATEWAY &&
|
||||
PortalHandler.getByAdjacentEntrance(event.getFrom()) != null &&
|
||||
event.getFrom().getWorld() != null && event.getFrom().getWorld().equals(event.getTo().getWorld()) &&
|
||||
event.getFrom().distance(event.getTo()) <= 1) {
|
||||
event.setCancelled(true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user