mirror of
https://github.com/CitizensDev/Citizens2.git
synced 2024-11-28 05:35:45 +01:00
Fix a multiworld issue in LookClose
This commit is contained in:
parent
c5e95eb667
commit
32445afec6
@ -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