Fixed health issue on login

This commit is contained in:
Jules 2024-02-11 23:36:21 +01:00
parent 68fbfc3576
commit d5ffd04117
2 changed files with 3 additions and 19 deletions

View File

@ -1,15 +0,0 @@
<settings>
<servers>
<server>
<id>nexus</id>
<username>${env.M2_REPO_USER}</username>
<password>${env.M2_REPO_PASS}</password>
<blocked>false</blocked>
</server>
<server>
<id>lumine</id>
<username>${env.M2_REPO_USER}</username>
<password>${env.M2_REPO_PASS}</password>
</server>
</servers>
</settings>

View File

@ -184,6 +184,9 @@ public class PlayerData extends SynchronizedDataHolder implements OfflinePlayerD
*/
@Override
public void markAsSynchronized() {
setupSkillTree();
updateTemporaryTriggers();
getStats().updateStats(true);
/*
* If the player is not dead and the health is 0, this means that the data was
@ -193,10 +196,6 @@ public class PlayerData extends SynchronizedDataHolder implements OfflinePlayerD
if (isOnline() && !getPlayer().isDead())
getPlayer().setHealth(MMOCoreUtils.fixResource(getHealth(), getPlayer().getAttribute(Attribute.GENERIC_MAX_HEALTH).getValue()));
setupSkillTree();
updateTemporaryTriggers();
getStats().updateStats(true);
// Finally mark synchronized
super.markAsSynchronized();
}