mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-23 05:36:46 +01:00
XP Bars will no longer update for party xp or vampirism xp
This commit is contained in:
parent
eb1f097d18
commit
8c5ea484eb
@ -142,9 +142,10 @@ 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)
|
||||||
{
|
{
|
||||||
updateXPBar(primarySkillType, plugin);
|
if(xpGainReason != XPGainReason.SHARED_PVP && xpGainReason != XPGainReason.SHARED_PVE && xpGainReason != XPGainReason.VAMPIRISM)
|
||||||
|
updateXPBar(primarySkillType, plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateXPBar(PrimarySkillType primarySkillType, mcMMO plugin)
|
public void updateXPBar(PrimarySkillType primarySkillType, mcMMO plugin)
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user