mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-25 12:15:53 +01:00
Fix a multiworld issue in LookClose
This commit is contained in:
parent
6cd9401a41
commit
e3fb3704b5
@ -88,7 +88,8 @@ public class LookClose extends Trait implements Runnable, Toggleable {
|
||||
private boolean hasInvalidTarget() {
|
||||
if (lookingAt == null)
|
||||
return true;
|
||||
if (!lookingAt.isOnline() || lookingAt.getLocation().distanceSquared(npc.getBukkitEntity().getLocation()) > 5) {
|
||||
if (!lookingAt.isOnline() || lookingAt.getWorld() != npc.getBukkitEntity().getWorld()
|
||||
|| lookingAt.getLocation().distanceSquared(npc.getBukkitEntity().getLocation()) > 5) {
|
||||
lookingAt = null;
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user