mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Child Skills will not trigger XP bars (for now)
This commit is contained in:
parent
e74bc9fd95
commit
df8f050cf1
@ -252,11 +252,12 @@ public class ExperienceConfig extends AutoUpdateConfigLoader {
|
||||
*/
|
||||
public boolean getDoExperienceBarsAlwaysUpdateTitle()
|
||||
{
|
||||
return config.getBoolean("Experience_Bars.ThisMayCauseLag.AlwaysUpdateTitlesWhenXPIsGained", false);
|
||||
return config.getBoolean("Experience_Bars.ThisMayCauseLag.AlwaysUpdateTitlesWhenXPIsGained.Enable", false);
|
||||
}
|
||||
|
||||
public boolean isExperienceBarsEnabled() { return config.getBoolean("Experience_Bars.Enable"); }
|
||||
public boolean isExperienceBarEnabled(PrimarySkillType primarySkillType) { return config.getBoolean("Experience_Bars."+StringUtils.getCapitalized(primarySkillType.toString())+".Enable");}
|
||||
public boolean getAddExtraDetails() { return config.getBoolean("Experience_Bars.ThisMayCauseLag.AlwaysUpdateTitlesWhenXPIsGained.ExtraDetails", false);}
|
||||
public boolean isExperienceBarsEnabled() { return config.getBoolean("Experience_Bars.Enable", true); }
|
||||
public boolean isExperienceBarEnabled(PrimarySkillType primarySkillType) { return config.getBoolean("Experience_Bars."+StringUtils.getCapitalized(primarySkillType.toString())+".Enable", true);}
|
||||
|
||||
public BarColor getExperienceBarColor(PrimarySkillType primarySkillType)
|
||||
{
|
||||
|
@ -149,8 +149,8 @@ public class McMMOPlayer {
|
||||
|
||||
public void updateXPBar(PrimarySkillType primarySkillType, mcMMO plugin)
|
||||
{
|
||||
/*if(experienceBarManager == null)
|
||||
experienceBarManager = new ExperienceBarManager(this);*/
|
||||
if(primarySkillType.isChildSkill())
|
||||
return;
|
||||
|
||||
experienceBarManager.updateExperienceBar(primarySkillType, plugin);
|
||||
}
|
||||
|
@ -55,6 +55,10 @@ public class ExperienceBarWrapper {
|
||||
}
|
||||
|
||||
private String getTitleTemplate() {
|
||||
//If they are using extra details
|
||||
if(ExperienceConfig.getInstance().getAddExtraDetails())
|
||||
return LocaleLoader.getString("XPBar.Complex.Template", LocaleLoader.getString("XPBar."+niceSkillName, getLevel()), getCurrentXP(), getMaxXP(), getPowerLevel(), getPercentageOfLevel());
|
||||
|
||||
return LocaleLoader.getString("XPBar."+niceSkillName, getLevel(), getCurrentXP(), getMaxXP(), getPowerLevel(), getPercentageOfLevel());
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,12 @@ Experience_Bars:
|
||||
# If you want to use a fancy edited title from the locale, then you'll probably want to turn this on, but it will make your server do a lot more work!
|
||||
# I recommend leaving this off!
|
||||
ThisMayCauseLag:
|
||||
AlwaysUpdateTitlesWhenXPIsGained: false
|
||||
ExtraDetails:
|
||||
Enable: false
|
||||
AlwaysUpdateTitlesWhenXPIsGained:
|
||||
Enable: false
|
||||
# You can make your own custom details in the locale file without having to use the ExtraDetails setting!
|
||||
ExtraDetails: true
|
||||
Acrobatics:
|
||||
Enable: true
|
||||
Color: PINK
|
||||
|
@ -94,6 +94,8 @@ XPBar.Swords=Swords Lv.[[GOLD]]{0}
|
||||
XPBar.Taming=Taming Lv.[[GOLD]]{0}
|
||||
XPBar.Unarmed=Unarmed Lv.[[GOLD]]{0}
|
||||
XPBar.Woodcutting=Woodcutting Lv.[[GOLD]]{0}
|
||||
#This is just a preset template that gets used if the 'ExtraDetails' setting is turned on in experience.yml (off by default), you can ignore this template and just edit the strings above
|
||||
XPBar.Complex.Template={0} [[YELLOW]]([[GREEN]]{1}[[YELLOW]]/[[GREEN]]{2}[[YELLOW]])[[DARK_AQUA]] {4}[[WHITE]]% Power Lvl.[[RED]]{3}
|
||||
# XP BAR Allows for the following variables -- {0} = Skill Level, {1} Current XP, {2} XP Needed for next level, {3} Power Level, {4} Percentage of Level
|
||||
# Make sure you turn on Experience_Bars.ThisMayCauseLag.AlwaysUpdateTitlesWhenXPIsGained if you want the XP bar title to update every time a player gains XP!
|
||||
# END STYLING
|
||||
|
Loading…
Reference in New Issue
Block a user