mirror of
https://github.com/PikaMug/Quests.git
synced 2024-11-26 04:36:06 +01:00
Location obj members must share world, fixes #1813
This commit is contained in:
parent
523da1cf19
commit
3d20f41add
@ -4081,10 +4081,19 @@ public class Quester implements Comparable<Quester> {
|
||||
if (!pp.getPlayerUUID().equals(getUUID())) {
|
||||
if (distanceSquared > 0) {
|
||||
final Player player = Bukkit.getPlayer(pp.getPlayerUUID());
|
||||
if (player != null && distanceSquared >= getPlayer().getLocation()
|
||||
if (player != null) {
|
||||
final Location locationOne = getPlayer().getLocation();
|
||||
final Location locationTwo = player.getLocation();
|
||||
if (locationOne.getWorld() != null && locationTwo.getWorld() != null) {
|
||||
if (locationOne.getWorld().getName().equals(locationTwo.getWorld()
|
||||
.getName())) {
|
||||
if (distanceSquared >= getPlayer().getLocation()
|
||||
.distanceSquared(player.getLocation())) {
|
||||
mq.add(plugin.getQuester(pp.getPlayerUUID()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
mq.add(plugin.getQuester(pp.getPlayerUUID()));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user