diff options
-rw-r--r-- | Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java | 2 | ||||
-rw-r--r-- | Essentials/src/com/earth2me/essentials/Teleport.java | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index 2f7128d39..b6743a59f 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -405,7 +405,7 @@ public class EssentialsPlayerListener implements Listener { user.setLastLocation(); } - if (teleportInvulnerability) + if (teleportInvulnerability && (event.getCause() == TeleportCause.PLUGIN || event.getCause() == TeleportCause.COMMAND)) { user.enableInvulnerabilityAfterTeleport(); } diff --git a/Essentials/src/com/earth2me/essentials/Teleport.java b/Essentials/src/com/earth2me/essentials/Teleport.java index 251e92646..225397b37 100644 --- a/Essentials/src/com/earth2me/essentials/Teleport.java +++ b/Essentials/src/com/earth2me/essentials/Teleport.java @@ -110,7 +110,7 @@ public class Teleport implements net.ess3.api.ITeleport { teleportee.getBase().leaveVehicle(); } - teleportee.getBase().teleport(LocationUtil.getSafeDestination(teleportee, loc)); + teleportee.getBase().teleport(LocationUtil.getSafeDestination(teleportee, loc), cause); } else { @@ -123,7 +123,7 @@ public class Teleport implements net.ess3.api.ITeleport { teleportee.getBase().leaveVehicle(); } - teleportee.getBase().teleport(LocationUtil.getRoundedDestination(loc)); + teleportee.getBase().teleport(LocationUtil.getRoundedDestination(loc), cause); } } |