From 91fb7998d79b63b051cb7033938d43f07d73c3a8 Mon Sep 17 00:00:00 2001 From: Dieu Date: Thu, 22 Feb 2024 14:07:32 +0100 Subject: [PATCH] Check if Parties are enabled before running inSameParty in CombatUtils#processCombatXP --- src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java b/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java index ba5ea16fc..1d5eea33f 100644 --- a/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java +++ b/src/main/java/com/gmail/nossr50/util/skills/CombatUtils.java @@ -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; }