Fix Party distance measuring worlds.
This commit is contained in:
parent
a41de55117
commit
2ac3667437
Binary file not shown.
@ -178,7 +178,7 @@ public class PartyManager {
|
|||||||
|
|
||||||
private static void AddNearbyPlayersToSameParty(Player sourcep) {
|
private static void AddNearbyPlayersToSameParty(Player sourcep) {
|
||||||
for (Player checkp : Bukkit.getOnlinePlayers()) {
|
for (Player checkp : Bukkit.getOnlinePlayers()) {
|
||||||
if (!IsInParty(checkp) && sourcep.getLocation().distanceSquared(checkp.getLocation())<=Math.pow(TwosideKeeper.PARTY_CHUNK_SIZE,2)) {
|
if (!IsInParty(checkp) && checkp.getWorld().equals(sourcep.getWorld()) && sourcep.getLocation().distanceSquared(checkp.getLocation())<=Math.pow(TwosideKeeper.PARTY_CHUNK_SIZE,2)) {
|
||||||
AddPlayerToParty(checkp,GetCurrentParty(sourcep));
|
AddPlayerToParty(checkp,GetCurrentParty(sourcep));
|
||||||
AddNearbyPlayersToSameParty(checkp);
|
AddNearbyPlayersToSameParty(checkp);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user