diff options
author | snowleo <schneeleo@gmail.com> | 2011-09-02 17:16:32 +0200 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-09-02 17:16:46 +0200 |
commit | 7d8b0c102cfa10c5a58bbcaab35d88dd234ad612 (patch) | |
tree | 4b6cead1a4409ef450018f2269408c3455bbc8ef | |
parent | 4abbbcb82bc7fd90c48f48a16d384c926db5b525 (diff) | |
download | Essentials-7d8b0c102cfa10c5a58bbcaab35d88dd234ad612.tar Essentials-7d8b0c102cfa10c5a58bbcaab35d88dd234ad612.tar.gz Essentials-7d8b0c102cfa10c5a58bbcaab35d88dd234ad612.tar.lz Essentials-7d8b0c102cfa10c5a58bbcaab35d88dd234ad612.tar.xz Essentials-7d8b0c102cfa10c5a58bbcaab35d88dd234ad612.zip |
Cross world move check
-rw-r--r-- | Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index 4828382d2..881d5a636 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -107,7 +107,8 @@ public class EssentialsPlayerListener extends PlayerListener return; } - if (user.getAfkPosition().distanceSquared(user.getLocation()) > 9) { + Location afk = user.getAfkPosition(); + if (afk == null || !event.getTo().getWorld().equals(afk.getWorld()) || afk.distanceSquared(event.getTo()) > 9) { user.updateActivity(true); } |