1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-10-04 10:01:44 +02:00

When in fly+god mode or when in creative mode, don't use safe teleport location when teleporting to other players.

Enable fly in unsafe circumstances.
This only works when teleporting within worlds for permission reasons.
This commit is contained in:
KHobbits
2013-08-11 22:42:29 +01:00
parent ecd80c0112
commit cd1709d137
4 changed files with 41 additions and 15 deletions

View File

@@ -97,7 +97,7 @@ public class Teleport implements net.ess3.api.ITeleport
cancel(false);
teleportee.setLastLocation();
teleportee.requestTeleport(null, false);
teleportee.getBase().teleport(LocationUtil.getSafeDestination(target.getLocation()), cause);
teleportee.getBase().teleport(LocationUtil.getSafeDestination(teleportee, target.getLocation()), cause);
}
//The teleportPlayer function is used when you want to normally teleportPlayer someone to a location or player.