Check if Parties are enabled before running inSameParty in CombatUtils#processCombatXP

This commit is contained in:
Dieu 2024-02-22 14:07:32 +01:00
parent 1c1781cee7
commit 91fb7998d7

View File

@ -741,7 +741,8 @@ public final class CombatUtils {
XPGainReason xpGainReason;
if (target instanceof Player defender) {
if (!ExperienceConfig.getInstance().getExperienceGainsPlayerVersusPlayerEnabled() || mcMMO.p.getPartyManager().inSameParty(mcMMOPlayer.getPlayer(), (Player) target)) {
if (!ExperienceConfig.getInstance().getExperienceGainsPlayerVersusPlayerEnabled() ||
(mcMMO.p.getPartyConfig().isPartyEnabled() && mcMMO.p.getPartyManager().inSameParty(mcMMOPlayer.getPlayer(), (Player) target))) {
return;
}