Skip to content

Commit

Permalink
Fixed persistent data is not merged correctly when updating players
Browse files Browse the repository at this point in the history
  • Loading branch information
OmerBenGera committed Oct 29, 2022
1 parent 814ecb8 commit 6a36325
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -751,6 +751,11 @@ public void merge(SuperiorPlayer otherPlayer) {
this.borderColor = otherPlayer.getBorderColor();
this.lastTimeStatus = otherPlayer.getLastTimeStatus();

if (!otherPlayer.isPersistentDataContainerEmpty()) {
byte[] data = otherPlayer.getPersistentDataContainer().serialize();
getPersistentDataContainer().load(data);
}

// Convert data for missions
plugin.getMissions().convertPlayerData(otherPlayer, this);

Expand Down

0 comments on commit 6a36325

Please sign in to comment.