mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-15 02:59:06 +02:00
Make sure we leave any vehicles before teleporting.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user