mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
2.1.67
This commit is contained in:
parent
ff1bb0deed
commit
9111590dc2
@ -1,3 +1,18 @@
|
|||||||
|
Version 2.1.67
|
||||||
|
The XP bar now reflects whether or not the player is receiving the early game boost
|
||||||
|
Players who are receiving an early game boost will be shown "Learning a skill..." as the title of the XP bar while gaining XP
|
||||||
|
New locale string 'XPBar.Template.EarlyGameBoost'
|
||||||
|
|
||||||
|
NOTES:
|
||||||
|
You can turn off this system in experience.yml 'EarlyGameBoost.Enabled'
|
||||||
|
The Early Game Boost is a system in which players receive drastically increased XP gains for the first few levels (until the first set of skills are unlocked)
|
||||||
|
With default settings, this means players will be receiving boosted XP for the first 5 levels (50 for Retro)
|
||||||
|
The Early Game Boost ends when players get the first skill in each ability under default settings
|
||||||
|
The main purpose of this system is to alleviate progression issues with a few skills where the first set of unlocked abilities drastically increase how fun it is to level the skill
|
||||||
|
The secondary purpose of this system is to alleviate any psychological issues when grinding towards the first set of unlocks by making the first set of unlocks happen quickly
|
||||||
|
This system has been in place for a few versions now, but without an in game indicator of what was going on.
|
||||||
|
If you have XP bars off there is still no indicator that this system is in place, I'll address that at some point.
|
||||||
|
|
||||||
Version 2.1.66
|
Version 2.1.66
|
||||||
Fixed a bug that could happen if a player was removed from the DB when using MySQL/MariaDB when the user was offline
|
Fixed a bug that could happen if a player was removed from the DB when using MySQL/MariaDB when the user was offline
|
||||||
Fixed a minor memory leak for MySQL
|
Fixed a minor memory leak for MySQL
|
||||||
|
2
pom.xml
2
pom.xml
@ -2,7 +2,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
<groupId>com.gmail.nossr50.mcMMO</groupId>
|
||||||
<artifactId>mcMMO</artifactId>
|
<artifactId>mcMMO</artifactId>
|
||||||
<version>2.1.66</version>
|
<version>2.1.67</version>
|
||||||
<name>mcMMO</name>
|
<name>mcMMO</name>
|
||||||
<url>https://github.com/mcMMO-Dev/mcMMO</url>
|
<url>https://github.com/mcMMO-Dev/mcMMO</url>
|
||||||
<scm>
|
<scm>
|
||||||
|
@ -9,6 +9,7 @@ import com.gmail.nossr50.events.experience.McMMOPlayerLevelUpEvent;
|
|||||||
import com.gmail.nossr50.events.experience.McMMOPlayerXpGainEvent;
|
import com.gmail.nossr50.events.experience.McMMOPlayerXpGainEvent;
|
||||||
import com.gmail.nossr50.events.skills.abilities.McMMOPlayerAbilityActivateEvent;
|
import com.gmail.nossr50.events.skills.abilities.McMMOPlayerAbilityActivateEvent;
|
||||||
import com.gmail.nossr50.mcMMO;
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
import com.gmail.nossr50.util.player.PlayerLevelUtils;
|
||||||
import com.gmail.nossr50.util.player.UserManager;
|
import com.gmail.nossr50.util.player.UserManager;
|
||||||
import com.gmail.nossr50.util.scoreboards.ScoreboardManager;
|
import com.gmail.nossr50.util.scoreboards.ScoreboardManager;
|
||||||
import com.gmail.nossr50.util.skills.RankUtils;
|
import com.gmail.nossr50.util.skills.RankUtils;
|
||||||
@ -101,7 +102,7 @@ public class SelfListener implements Listener {
|
|||||||
int earlyGameBonusXP = 0;
|
int earlyGameBonusXP = 0;
|
||||||
|
|
||||||
//Give some bonus XP for low levels
|
//Give some bonus XP for low levels
|
||||||
if(mcMMOPlayer.getSkillLevel(primarySkillType) <= mcMMO.getPlayerLevelUtils().getEarlyGameCutoff(primarySkillType))
|
if(PlayerLevelUtils.qualifiesForEarlyGameBoost(mcMMOPlayer, primarySkillType))
|
||||||
{
|
{
|
||||||
earlyGameBonusXP += (mcMMOPlayer.getXpToLevel(primarySkillType) * 0.05);
|
earlyGameBonusXP += (mcMMOPlayer.getXpToLevel(primarySkillType) * 0.05);
|
||||||
event.setRawXpGained(event.getRawXpGained() + earlyGameBonusXP);
|
event.setRawXpGained(event.getRawXpGained() + earlyGameBonusXP);
|
||||||
@ -156,4 +157,6 @@ public class SelfListener implements Listener {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -5,6 +5,7 @@ import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
|||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
import com.gmail.nossr50.locale.LocaleLoader;
|
import com.gmail.nossr50.locale.LocaleLoader;
|
||||||
import com.gmail.nossr50.util.StringUtils;
|
import com.gmail.nossr50.util.StringUtils;
|
||||||
|
import com.gmail.nossr50.util.player.PlayerLevelUtils;
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
import org.bukkit.boss.BarColor;
|
import org.bukkit.boss.BarColor;
|
||||||
import org.bukkit.boss.BarStyle;
|
import org.bukkit.boss.BarStyle;
|
||||||
@ -20,7 +21,6 @@ public class ExperienceBarWrapper {
|
|||||||
|
|
||||||
private final PrimarySkillType primarySkillType; //Primary Skill
|
private final PrimarySkillType primarySkillType; //Primary Skill
|
||||||
private BossBar bossBar;
|
private BossBar bossBar;
|
||||||
private final Server server;
|
|
||||||
protected final McMMOPlayer mcMMOPlayer;
|
protected final McMMOPlayer mcMMOPlayer;
|
||||||
private int lastLevelUpdated;
|
private int lastLevelUpdated;
|
||||||
|
|
||||||
@ -33,7 +33,6 @@ public class ExperienceBarWrapper {
|
|||||||
public ExperienceBarWrapper(PrimarySkillType primarySkillType, McMMOPlayer mcMMOPlayer)
|
public ExperienceBarWrapper(PrimarySkillType primarySkillType, McMMOPlayer mcMMOPlayer)
|
||||||
{
|
{
|
||||||
this.mcMMOPlayer = mcMMOPlayer;
|
this.mcMMOPlayer = mcMMOPlayer;
|
||||||
this.server = mcMMOPlayer.getPlayer().getServer(); //Might not be good for bungee to do this
|
|
||||||
this.primarySkillType = primarySkillType;
|
this.primarySkillType = primarySkillType;
|
||||||
title = "";
|
title = "";
|
||||||
lastLevelUpdated = 0;
|
lastLevelUpdated = 0;
|
||||||
@ -58,7 +57,10 @@ public class ExperienceBarWrapper {
|
|||||||
|
|
||||||
private String getTitleTemplate() {
|
private String getTitleTemplate() {
|
||||||
//If they are using extra details
|
//If they are using extra details
|
||||||
if(ExperienceConfig.getInstance().getAddExtraDetails())
|
|
||||||
|
if(ExperienceConfig.getInstance().isEarlyGameBoostEnabled() && PlayerLevelUtils.qualifiesForEarlyGameBoost(mcMMOPlayer, primarySkillType)) {
|
||||||
|
return LocaleLoader.getString("XPBar.Template.EarlyGameBoost");
|
||||||
|
} else if(ExperienceConfig.getInstance().getAddExtraDetails())
|
||||||
return LocaleLoader.getString("XPBar.Complex.Template", LocaleLoader.getString("XPBar."+niceSkillName, getLevel()), getCurrentXP(), getMaxXP(), getPowerLevel(), getPercentageOfLevel());
|
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());
|
return LocaleLoader.getString("XPBar."+niceSkillName, getLevel(), getCurrentXP(), getMaxXP(), getPowerLevel(), getPercentageOfLevel());
|
||||||
@ -106,6 +108,13 @@ public class ExperienceBarWrapper {
|
|||||||
else
|
else
|
||||||
bossBar.setProgress(v);
|
bossBar.setProgress(v);
|
||||||
|
|
||||||
|
//Check player level
|
||||||
|
if(ExperienceConfig.getInstance().isEarlyGameBoostEnabled() && PlayerLevelUtils.qualifiesForEarlyGameBoost(mcMMOPlayer, primarySkillType)) {
|
||||||
|
setColor(BarColor.YELLOW);
|
||||||
|
} else {
|
||||||
|
setColor(ExperienceConfig.getInstance().getExperienceBarColor(primarySkillType));
|
||||||
|
}
|
||||||
|
|
||||||
//Every time progress updates we need to check for a title update
|
//Every time progress updates we need to check for a title update
|
||||||
if(getLevel() != lastLevelUpdated || ExperienceConfig.getInstance().getDoExperienceBarsAlwaysUpdateTitle())
|
if(getLevel() != lastLevelUpdated || ExperienceConfig.getInstance().getDoExperienceBarsAlwaysUpdateTitle())
|
||||||
{
|
{
|
||||||
|
@ -2,7 +2,9 @@ package com.gmail.nossr50.util.player;
|
|||||||
|
|
||||||
import com.gmail.nossr50.config.Config;
|
import com.gmail.nossr50.config.Config;
|
||||||
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
import com.gmail.nossr50.config.experience.ExperienceConfig;
|
||||||
|
import com.gmail.nossr50.datatypes.player.McMMOPlayer;
|
||||||
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
import com.gmail.nossr50.datatypes.skills.PrimarySkillType;
|
||||||
|
import com.gmail.nossr50.mcMMO;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
|
||||||
@ -37,4 +39,15 @@ public class PlayerLevelUtils {
|
|||||||
{
|
{
|
||||||
return earlyGameBoostCutoffs.get(primarySkillType);
|
return earlyGameBoostCutoffs.get(primarySkillType);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if a player is currently qualifying for the early game boosted XP
|
||||||
|
* Will return false only if a player is above the boost level cutoff, it does not check config settings to see if the early game boost is on
|
||||||
|
* @param mcMMOPlayer target player
|
||||||
|
* @param primarySkillType target skill
|
||||||
|
* @return if the player would qualify for the XP boost if its enabled
|
||||||
|
*/
|
||||||
|
public static boolean qualifiesForEarlyGameBoost(McMMOPlayer mcMMOPlayer, PrimarySkillType primarySkillType) {
|
||||||
|
return mcMMOPlayer.getSkillLevel(primarySkillType) < mcMMO.getPlayerLevelUtils().getEarlyGameCutoff(primarySkillType);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -103,6 +103,8 @@ Commands.Party.Header=[[RED]]-----[][[GREEN]]PARTY[[RED]][]-----
|
|||||||
Commands.Party.Features.Header=[[RED]]-----[][[GREEN]]FEATURES[[RED]][]-----
|
Commands.Party.Features.Header=[[RED]]-----[][[GREEN]]FEATURES[[RED]][]-----
|
||||||
# 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
|
# 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!
|
# Make sure you turn on Experience_Bars.ThisMayCauseLag.AlwaysUpdateTitlesWhenXPIsGained if you want the XP bar title to update every time a player gains XP!
|
||||||
|
XPBar.Template={0}
|
||||||
|
XPBar.Template.EarlyGameBoost=[[GOLD]]Learning a new skill...
|
||||||
XPBar.Acrobatics=Acrobatics Lv.[[GOLD]]{0}
|
XPBar.Acrobatics=Acrobatics Lv.[[GOLD]]{0}
|
||||||
XPBar.Alchemy=Alchemy Lv.[[GOLD]]{0}
|
XPBar.Alchemy=Alchemy Lv.[[GOLD]]{0}
|
||||||
XPBar.Archery=Archery Lv.[[GOLD]]{0}
|
XPBar.Archery=Archery Lv.[[GOLD]]{0}
|
||||||
|
Loading…
Reference in New Issue
Block a user