xpratemultiplier fix

This commit is contained in:
nossr50 2019-02-25 17:02:29 -08:00
parent 5647eebe99
commit 198b7e3f46
2 changed files with 7 additions and 2 deletions

View File

@ -50,7 +50,7 @@ public class XprateCommand implements TabExecutor {
mcMMO.p.toggleXpEventEnabled();
}
ExperienceConfig.getInstance().setExperienceGainsGlobalMultiplier(ORIGINAL_XP_RATE);
ExperienceConfig.getInstance().setGlobalXPMultiplier(ORIGINAL_XP_RATE);
return true;
case 2:
@ -81,7 +81,7 @@ public class XprateCommand implements TabExecutor {
return true;
}
ExperienceConfig.getInstance().setExperienceGainsGlobalMultiplier(newXpRate);
ExperienceConfig.getInstance().setGlobalXPMultiplier(newXpRate);
if (mcMMO.p.isXPEventEnabled()) {
if(AdvancedConfig.getInstance().useTitlesForXPEvent())

View File

@ -253,6 +253,11 @@ public class ExperienceConfig extends ConfigValidated {
return getDoubleValue(EXPERIENCE_FORMULA, MULTIPLIER, GLOBAL);
}
public void setGlobalXPMultiplier(double newXpMultiplier)
{
getUserRootNode().getNode(EXPERIENCE_FORMULA, MULTIPLIER, GLOBAL).setValue(newXpMultiplier);
}
//TODO: Rewrite this
/*public void setExperienceGainsGlobalMultiplier(double value) {
config.set(EXPERIENCE_FORMULA, MULTIPLIER, GLOBAL, value);