diff options
author | snowleo <schneeleo@gmail.com> | 2011-10-09 23:45:46 +0200 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-10-09 23:45:46 +0200 |
commit | 6012086fa5a2593096bd2d39c2435f9ab169c901 (patch) | |
tree | ae43fed96163eef6b6fc8c27ed11ac8929bc35e4 | |
parent | 67c0f57756b20e6366bafa2ccfe2b0f1e0243e11 (diff) | |
download | Essentials-6012086fa5a2593096bd2d39c2435f9ab169c901.tar Essentials-6012086fa5a2593096bd2d39c2435f9ab169c901.tar.gz Essentials-6012086fa5a2593096bd2d39c2435f9ab169c901.tar.lz Essentials-6012086fa5a2593096bd2d39c2435f9ab169c901.tar.xz Essentials-6012086fa5a2593096bd2d39c2435f9ab169c901.zip |
Reverting ementalos change on freeze-afk, hopefully fixing the flickering.
-rw-r--r-- | Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index 5d121b82e..3d5851d93 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -95,9 +95,16 @@ public class EssentialsPlayerListener extends PlayerListener final Location from = event.getFrom(); final Location to = event.getTo().clone(); to.setX(from.getX()); - to.setY(from.getBlock().getTypeId() == 0 ? from.getY() - 1 : from.getY()); + to.setY(from.getY()); to.setZ(from.getZ()); - event.setTo(to); + try + { + event.setTo(Util.getSafeDestination(to)); + } + catch (Exception ex) + { + event.setTo(to); + } return; } |