From 9a358a8b0f2154efd610dad1d53d6b265a1d29f0 Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 18 Apr 2012 07:33:37 +1000 Subject: Use a quick (and working comparer) --- Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index ef2be0f33..81f0e0219 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -14,7 +14,6 @@ import java.util.logging.Level; import java.util.logging.Logger; import org.bukkit.Location; import org.bukkit.Material; -import org.bukkit.Server; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; @@ -104,7 +103,7 @@ public class EssentialsPlayerListener implements Listener } final Location afk = user.getAfkPosition(); - if (afk == null || !event.getTo().getWorld().equals(afk.getWorld()) || afk.distanceSquared(event.getTo()) > 9) + if (afk == null || event.getTo().getWorld() != afk.getWorld() || afk.distanceSquared(event.getTo()) > 9) { user.updateActivity(true); } -- cgit v1.2.3