mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-03 11:06:08 +00: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
1 changed files with 486 additions and 493 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue