From 1f06376782c2293e8886878bbe66d38f0094b279 Mon Sep 17 00:00:00 2001 From: Indyuce Date: Thu, 15 Dec 2022 10:18:21 +0100 Subject: [PATCH] Fixed exp split in diff worlds outputing error --- .../main/java/net/Indyuce/mmocore/api/player/PlayerData.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java b/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java index b54c40da..720b69d7 100644 --- a/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java +++ b/MMOCore-API/src/main/java/net/Indyuce/mmocore/api/player/PlayerData.java @@ -800,7 +800,7 @@ public class PlayerData extends OfflinePlayerData implements Closable, Experienc return false; final double maxDis = MMOCore.plugin.configManager.partyMaxExpSplitRange; - return maxDis <= 0 || pd.getPlayer().getLocation().distanceSquared(getPlayer().getLocation()) < maxDis * maxDis; + return maxDis <= 0 || (pd.getPlayer().getWorld().equals(getPlayer().getWorld()) && pd.getPlayer().getLocation().distanceSquared(getPlayer().getLocation()) < maxDis * maxDis); }).collect(Collectors.toList()); value /= (nearbyMembers.size() + 1); for (PlayerData member : nearbyMembers)