Skip to content

Commit

Permalink
Fix error when creating a new player
Browse files Browse the repository at this point in the history
  • Loading branch information
Melledy committed Dec 11, 2023
1 parent 5a46313 commit b84f24e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/emu/lunarcore/game/player/Player.java
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,11 @@ public void setLevel(int lvl) {

this.level = newLevel;
this.exp = GameData.getPlayerExpRequired(this.level);
this.sendPacket(new PacketPlayerSyncScNotify(this));
this.save();

if (this.isOnline()) {
this.getSession().send(new PacketPlayerSyncScNotify(this));
this.save();
}
}

private void onLevelChange(int oldLevel, int newLevel) {
Expand Down

0 comments on commit b84f24e

Please sign in to comment.