mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-12-29 12:37:36 +01:00
Use a quick (and working comparer)
This commit is contained in:
parent
9d398b1d2e
commit
de541f6654
@ -14,7 +14,6 @@ import java.util.logging.Level;
|
|||||||
import java.util.logging.Logger;
|
import java.util.logging.Logger;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.Server;
|
|
||||||
import org.bukkit.entity.Player;
|
import org.bukkit.entity.Player;
|
||||||
import org.bukkit.event.EventHandler;
|
import org.bukkit.event.EventHandler;
|
||||||
import org.bukkit.event.EventPriority;
|
import org.bukkit.event.EventPriority;
|
||||||
@ -104,7 +103,7 @@ public class EssentialsPlayerListener implements Listener
|
|||||||
}
|
}
|
||||||
|
|
||||||
final Location afk = user.getAfkPosition();
|
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);
|
user.updateActivity(true);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user