mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 21:26:46 +01:00
Fixed XP Bar
This commit is contained in:
parent
6c6fb117ea
commit
8b07b189d4
@ -8,6 +8,7 @@ Key:
|
||||
- Removal
|
||||
|
||||
Version 1.3.05-dev
|
||||
= Fixed XP bar not updating when XP was gained
|
||||
= Fixed bug with repairing wooden tools
|
||||
= Fixed bug where spawned wolves only had 8 health.
|
||||
! Changed Tree Feller to account for ability durability loss but not leaves.
|
||||
|
@ -190,9 +190,9 @@ public class Skills {
|
||||
*/
|
||||
public static void XpCheckSkill(SkillType skillType, Player player) {
|
||||
PlayerProfile PP = Users.getProfile(player);
|
||||
int skillups = 0;
|
||||
|
||||
if (PP.getSkillXpLevel(skillType) >= PP.getXpToLevel(skillType)) {
|
||||
int skillups = 0;
|
||||
|
||||
while (PP.getSkillXpLevel(skillType) >= PP.getXpToLevel(skillType)) {
|
||||
if (skillType.getMaxLevel() >= PP.getSkillLevel(skillType) + 1) {
|
||||
@ -233,6 +233,16 @@ public class Skills {
|
||||
player.sendMessage(mcLocale.getString("Skills."+capitalized+"Up", new Object[] {String.valueOf(skillups), PP.getSkillLevel(skillType)}));
|
||||
}
|
||||
}
|
||||
|
||||
/* Always update XP Bar (Check if no levels were gained first to remove redundancy) */
|
||||
if(skillups == 0 && player instanceof SpoutPlayer) {
|
||||
SpoutPlayer sPlayer = (SpoutPlayer) player;
|
||||
if (sPlayer.isSpoutCraftEnabled()) {
|
||||
if (LoadProperties.xpbar) {
|
||||
SpoutStuff.updateXpBar(sPlayer);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user