mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-08-03 04:55:28 +02:00
Add and wire up Early Game Boost settings
This commit is contained in:
@@ -118,9 +118,6 @@ public class ExperienceConfig extends ConfigValidated {
|
||||
return reason;
|
||||
}
|
||||
|
||||
public boolean isEarlyGameBoostEnabled() { return config.getBoolean("EarlyGameBoost.Enabled", true); }
|
||||
public double getEarlyGameBoostMultiplier() { return config.getDouble("EarlyGameBoost.MaxLevelMultiplier", 0.05D); }
|
||||
|
||||
/*
|
||||
* FORMULA SETTINGS
|
||||
*/
|
||||
|
@@ -0,0 +1,29 @@
|
||||
package com.gmail.nossr50.config.hocon.playerleveling;
|
||||
|
||||
import ninja.leaping.configurate.objectmapping.Setting;
|
||||
import ninja.leaping.configurate.objectmapping.serialize.ConfigSerializable;
|
||||
|
||||
@ConfigSerializable
|
||||
public class ConfigLevelEarlyGameBoost {
|
||||
|
||||
public static final boolean EARLY_GAME_BOOST_DEFAULT = true;
|
||||
public static final double BOOST_MULTIPLIER_DEFAULT = 0.05D;
|
||||
|
||||
@Setting(value = "Enabled", comment = "If set to true, the early game XP boost will be applied." +
|
||||
"\nDefault value: "+EARLY_GAME_BOOST_DEFAULT)
|
||||
private boolean enableEarlyGameBoost = EARLY_GAME_BOOST_DEFAULT;
|
||||
|
||||
@Setting(value = "Max-Level-Percentage", comment = "This value is multiplied by a skills level cap to see determine when to stop giving a boost." +
|
||||
"\nLevels in mcMMO are not capped by default, so if the skill has no set level cap it will instead use the value 100 or 1000 (if in RetroMode)" +
|
||||
"\nWith default settings, this will result in the first 5 levels (or 50 in Retro) being boosted" +
|
||||
"\nDefault value: "+BOOST_MULTIPLIER_DEFAULT)
|
||||
private double earlyGameBoostMultiplier = BOOST_MULTIPLIER_DEFAULT;
|
||||
|
||||
public double getEarlyGameBoostMultiplier() {
|
||||
return earlyGameBoostMultiplier;
|
||||
}
|
||||
|
||||
public boolean isEnableEarlyGameBoost() {
|
||||
return enableEarlyGameBoost;
|
||||
}
|
||||
}
|
@@ -20,6 +20,10 @@ public class ConfigLeveling {
|
||||
@Setting(value = "General", comment = "Settings for player leveling that don't fall into other categories")
|
||||
private ConfigSectionLevelingGeneral configSectionLevelingGeneral = new ConfigSectionLevelingGeneral();
|
||||
|
||||
@Setting(value = "Early-Game-Boost", comment = "mcMMO incorporates an early game XP boost to get players to the first abilities in each skill faster." +
|
||||
"\nUsing default settings, players will reach level 5 (or 50 in RetroMode) much faster than they normally would.")
|
||||
private ConfigLevelEarlyGameBoost earlyGameBoost = new ConfigLevelEarlyGameBoost();
|
||||
|
||||
@Setting(value = "Experience-Formula")
|
||||
private ConfigExperienceFormula configExperienceFormula = new ConfigExperienceFormula();
|
||||
|
||||
@@ -27,6 +31,18 @@ public class ConfigLeveling {
|
||||
* GETTER BOILERPLATE
|
||||
*/
|
||||
|
||||
public double getEarlyGameBoostMultiplier() {
|
||||
return earlyGameBoost.getEarlyGameBoostMultiplier();
|
||||
}
|
||||
|
||||
public boolean isEnableEarlyGameBoost() {
|
||||
return earlyGameBoost.isEnableEarlyGameBoost();
|
||||
}
|
||||
|
||||
public ConfigLevelEarlyGameBoost getEarlyGameBoost() {
|
||||
return earlyGameBoost;
|
||||
}
|
||||
|
||||
public ConfigSectionLevelCaps getConfigSectionLevelCaps() {
|
||||
return configSectionLevelCaps;
|
||||
}
|
||||
|
Reference in New Issue
Block a user