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,9 +4081,18 @@ public class Quester implements Comparable<Quester> {
|
|||||||
if (!pp.getPlayerUUID().equals(getUUID())) {
|
if (!pp.getPlayerUUID().equals(getUUID())) {
|
||||||
if (distanceSquared > 0) {
|
if (distanceSquared > 0) {
|
||||||
final Player player = Bukkit.getPlayer(pp.getPlayerUUID());
|
final Player player = Bukkit.getPlayer(pp.getPlayerUUID());
|
||||||
if (player != null && distanceSquared >= getPlayer().getLocation()
|
if (player != null) {
|
||||||
.distanceSquared(player.getLocation())) {
|
final Location locationOne = getPlayer().getLocation();
|
||||||
mq.add(plugin.getQuester(pp.getPlayerUUID()));
|
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 {
|
} else {
|
||||||
mq.add(plugin.getQuester(pp.getPlayerUUID()));
|
mq.add(plugin.getQuester(pp.getPlayerUUID()));
|
||||||
|
Loading…
Reference in New Issue
Block a user