XP Bars will no longer update for party xp or vampirism xp

This commit is contained in:
nossr50 2019-01-19 15:10:42 -08:00
parent eb1f097d18
commit 8c5ea484eb
2 changed files with 6 additions and 5 deletions

View File

@ -142,8 +142,9 @@ public class McMMOPlayer {
experienceBarManager.hideExperienceBar(primarySkillType); experienceBarManager.hideExperienceBar(primarySkillType);
}*/ }*/
public void processPostXpEvent(PrimarySkillType primarySkillType, mcMMO plugin) public void processPostXpEvent(XPGainReason xpGainReason, PrimarySkillType primarySkillType, mcMMO plugin)
{ {
if(xpGainReason != XPGainReason.SHARED_PVP && xpGainReason != XPGainReason.SHARED_PVE && xpGainReason != XPGainReason.VAMPIRISM)
updateXPBar(primarySkillType, plugin); updateXPBar(primarySkillType, plugin);
} }

View File

@ -63,7 +63,7 @@ public class SelfListener implements Listener {
if (event.getXpGainReason() == XPGainReason.COMMAND) if (event.getXpGainReason() == XPGainReason.COMMAND)
{ {
//Update the XP Bar //Update the XP Bar
mcMMOPlayer.processPostXpEvent(primarySkillType, plugin); mcMMOPlayer.processPostXpEvent(event.getXpGainReason(), primarySkillType, plugin);
return; return;
} }
@ -72,7 +72,7 @@ public class SelfListener implements Listener {
if (threshold <= 0 || !ExperienceConfig.getInstance().getDiminishedReturnsEnabled()) { if (threshold <= 0 || !ExperienceConfig.getInstance().getDiminishedReturnsEnabled()) {
// Diminished returns is turned off // Diminished returns is turned off
//Update the XP Bar //Update the XP Bar
mcMMOPlayer.processPostXpEvent(primarySkillType, plugin); mcMMOPlayer.processPostXpEvent(event.getXpGainReason(), primarySkillType, plugin);
return; return;
} }
@ -118,6 +118,6 @@ public class SelfListener implements Listener {
//Update the XP Bar //Update the XP Bar
if(!event.isCancelled()) if(!event.isCancelled())
mcMMOPlayer.processPostXpEvent(primarySkillType, plugin); mcMMOPlayer.processPostXpEvent(event.getXpGainReason(), primarySkillType, plugin);
} }
} }