From a0667d49b85f8c5e3fb76e64a920ae3440717979 Mon Sep 17 00:00:00 2001 From: Eric Stokes Date: Thu, 25 Aug 2011 19:42:52 -0600 Subject: [PATCH] Fix our Custom PTA not obeying useSafeTeleporter --- src/main/java/com/onarandombox/utils/MVTravelAgent.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/onarandombox/utils/MVTravelAgent.java b/src/main/java/com/onarandombox/utils/MVTravelAgent.java index 03a52335..ea05063e 100644 --- a/src/main/java/com/onarandombox/utils/MVTravelAgent.java +++ b/src/main/java/com/onarandombox/utils/MVTravelAgent.java @@ -72,7 +72,10 @@ public class MVTravelAgent implements TravelAgent { this.core.log(Level.FINE, "Using Stock TP method. This cannon will have 0 velocity"); } MVTeleport teleporter = new MVTeleport(this.core); - Location newLoc = teleporter.getSafeLocation(this.player, this.destination); + Location newLoc = this.destination.getLocation(this.player); + if (this.destination.useSafeTeleporter()) { + newLoc = teleporter.getSafeLocation(this.player, this.destination); + } if (newLoc == null) { return this.player.getLocation(); }