mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-08-14 10:09:23 +02:00
Moved hudType back to PlayerProfile
Removed some convenient methods from PlayerProfile to avoid NPE because of spoutHud
This commit is contained in:
@@ -230,14 +230,10 @@ public class Skills {
|
||||
String capitalized = Misc.getCapitalized(skillType.toString());
|
||||
|
||||
/* Spout Stuff */
|
||||
if (mcMMO.spoutEnabled && player instanceof SpoutPlayer) {
|
||||
if (mcMMO.spoutEnabled) {
|
||||
SpoutPlayer spoutPlayer = SpoutManager.getPlayer(player);
|
||||
|
||||
if (spoutPlayer.isSpoutCraftEnabled()) {
|
||||
if (SpoutConfig.getInstance().getXPBarEnabled()) {
|
||||
profile.updateXpBar();
|
||||
}
|
||||
|
||||
if (spoutPlayer != null && spoutPlayer.isSpoutCraftEnabled()) {
|
||||
SpoutStuff.levelUpNotification(skillType, spoutPlayer);
|
||||
|
||||
/* Update custom titles */
|
||||
@@ -254,12 +250,12 @@ public class Skills {
|
||||
}
|
||||
}
|
||||
|
||||
/* Always update XP Bar (Check if no levels were gained first to remove redundancy) */
|
||||
if (skillups == 0 && mcMMO.spoutEnabled && player instanceof SpoutPlayer) {
|
||||
if (mcMMO.spoutEnabled) {
|
||||
SpoutPlayer spoutPlayer = (SpoutPlayer) player;
|
||||
if (spoutPlayer.isSpoutCraftEnabled()) {
|
||||
|
||||
if (spoutPlayer != null && spoutPlayer.isSpoutCraftEnabled()) {
|
||||
if (SpoutConfig.getInstance().getXPBarEnabled()) {
|
||||
profile.updateXpBar();
|
||||
profile.getSpoutHud().updateXpBar();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user