Merge branch 'master' of github.com:mcMMO-Dev/mcMMO into configurable

This commit is contained in:
nossr50 2019-05-03 03:46:28 -07:00
commit 29835a3316
5 changed files with 37 additions and 8 deletions

View File

@ -164,6 +164,24 @@ Version 2.2.0
Added API method to grab the level cap of a skill by its PrimarySkillType ENUM definition
Added API method to check if a skill was being level capped
Version 2.1.52
Updated Japanese locale (thanks snake0053)
Added a toggle for the early game XP boost to experience.yml 'EarlyGameBoost.Enabled'
Added a max level multiplier for determining early game boosts cutoff to experience.yml 'EarlyGameBoost.MaxLevelMultiplier'
Version 2.1.51
You can now customize a locale outside of the JAR! (Thanks mikroskeem)
Added a new locale reload command 'mmolocalereload' (Thanks mikroskeem)
Locales can now be overriden by placing a file with an appropriate name inside /plugins/mcMMO/locales/ (Thanks mikroskeem)
NOTES
You can find the up to date current en_US locale entries here: https://github.com/mcMMO-Dev/mcMMO/blob/master/src/main/resources/locale/locale_en_US.properties
You do NOT have to replace the whole locale, you can replace only the strings you want to!
Locales only support ASCII and UTF16 characters at the moment, so you'll need to run special characters through a UTF16 converter (google it) to get them to work, I'll be fixing this in the future!
The locale name must match the internal file you are overriding (ie: locale_en_US.properties)
Locale will first check for a users locale file, if it doesn't exist it will use internal resources (files inside the JAR)
If a locale is found, it will use locale entries from that file, if any entries are missing, it will use entries from en_US inside the JAR
The locale file names are structured like this 'locale_XX_XX.properties', replace XX with your country codes, if you are not overriding en_US you will have to change the targetted locale inside config.yml
Version 2.1.50
Fixed a bug where early game XP boost (level 1-5) didn't function in certain circumstances

View File

@ -118,6 +118,9 @@ 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
*/

View File

@ -88,17 +88,21 @@ public class SelfListener implements Listener {
return;
}
int earlyLevelBonusXPCap = mcMMO.isRetroModeEnabled() ? 50 : 5;
int earlyGameBonusXP = 0;
//Give some bonus XP for low levels
if(mcMMOPlayer.getSkillLevel(primarySkillType) < earlyLevelBonusXPCap)
if(ExperienceConfig.getInstance().isEarlyGameBoostEnabled())
{
earlyGameBonusXP += (mcMMOPlayer.getXpToLevel(primarySkillType) * 0.05);
event.setRawXpGained(event.getRawXpGained() + earlyGameBonusXP);
int earlyLevelBonusXPCap = (int) (ExperienceConfig.getInstance().getEarlyGameBoostMultiplier() * Config.getInstance().getLevelCap(event.getSkill()));
int earlyGameBonusXP = 0;
//Give some bonus XP for low levels
if(mcMMOPlayer.getSkillLevel(primarySkillType) < earlyLevelBonusXPCap)
{
earlyGameBonusXP += (mcMMOPlayer.getXpToLevel(primarySkillType) * 0.05);
event.setRawXpGained(event.getRawXpGained() + earlyGameBonusXP);
}
}
int threshold = ExperienceConfig.getInstance().getDiminishedReturnsThreshold(primarySkillType);
if (threshold <= 0 || !ExperienceConfig.getInstance().getDiminishedReturnsEnabled()) {

View File

@ -21,6 +21,10 @@
# Splits the boss bar into 6 segments
#SOLID
# The bar is one solid piece
EarlyGameBoost:
Enabled: true
#Used to determine the cap of the max boot, with default level cap it will be 5 on standard, and 50 on retro
MaxLevelMultiplier: 0.05
ExploitFix:
# Prevent many exploits related to fishing
Fishing: true