mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-22 09:08:01 +01:00
Don't teleport to a safe location for AFK freeze when flying (#4944)
Fixes #4902.
This commit is contained in:
parent
0931b21f6d
commit
96c6c951e8
@ -217,6 +217,10 @@ public class EssentialsPlayerListener implements Listener, FakeAccessor {
|
||||
to.setY(from.getY());
|
||||
to.setZ(from.getZ());
|
||||
try {
|
||||
if (event.getPlayer().getAllowFlight()) {
|
||||
// Don't teleport to a safe location here, they are either a god or flying
|
||||
throw new Exception();
|
||||
}
|
||||
event.setTo(LocationUtil.getSafeDestination(ess, to));
|
||||
} catch (final Exception ex) {
|
||||
event.setTo(to);
|
||||
|
Loading…
Reference in New Issue
Block a user