summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-09-02 17:16:32 +0200
committersnowleo <schneeleo@gmail.com>2011-09-02 17:16:46 +0200
commit7d8b0c102cfa10c5a58bbcaab35d88dd234ad612 (patch)
tree4b6cead1a4409ef450018f2269408c3455bbc8ef
parent4abbbcb82bc7fd90c48f48a16d384c926db5b525 (diff)
downloadEssentials-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.java3
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);
}