summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Essentials/src/com/earth2me/essentials/Teleport.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Teleport.java b/Essentials/src/com/earth2me/essentials/Teleport.java
index 270f7eead..f1d60f9c4 100644
--- a/Essentials/src/com/earth2me/essentials/Teleport.java
+++ b/Essentials/src/com/earth2me/essentials/Teleport.java
@@ -105,6 +105,10 @@ public class Teleport implements net.ess3.api.ITeleport
{
if (ess.getSettings().isTeleportSafetyEnabled())
{
+ if (teleportee.getBase().isInsideVehicle())
+ {
+ teleportee.getBase().leaveVehicle();;
+ }
teleportee.getBase().teleport(LocationUtil.getSafeDestination(teleportee, loc));
}
else
@@ -114,6 +118,10 @@ public class Teleport implements net.ess3.api.ITeleport
}
else
{
+ if (teleportee.getBase().isInsideVehicle())
+ {
+ teleportee.getBase().leaveVehicle();;
+ }
teleportee.getBase().teleport(loc);
}
}