Fix Party distance measuring worlds.

This commit is contained in:
sigonasr2 2016-08-13 22:13:42 -05:00
parent a41de55117
commit 2ac3667437
2 changed files with 1 additions and 1 deletions

Binary file not shown.

View File

@ -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);
} }