mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-09-13 08:28:02 +02:00
Fix freezeafk so that moving with mouse does not teleport you about. Add check for if some takes the ground away from you
This commit is contained in:
parent
d2c553652f
commit
48049f3870
@ -94,16 +94,9 @@ public class EssentialsPlayerListener extends PlayerListener
|
||||
final Location from = event.getFrom();
|
||||
final Location to = event.getTo().clone();
|
||||
to.setX(from.getX());
|
||||
to.setY(from.getY());
|
||||
to.setY(from.getBlock().getTypeId() == 0 ? from.getY() - 1 : from.getY());
|
||||
to.setZ(from.getZ());
|
||||
try
|
||||
{
|
||||
event.setTo(Util.getSafeDestination(to));
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
event.setTo(to);
|
||||
}
|
||||
event.setTo(to);
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user