Skip to content

Commit d63b557

Browse files
committed
fix: copy extra data from player team when creating a party team
1 parent 8caa7b6 commit d63b557

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

common/src/main/java/dev/ftb/mods/ftbteams/data/AbstractTeam.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,4 +275,8 @@ void saveIfNeeded(Path directory, HolderLookup.Provider provider) {
275275
shouldSave = false;
276276
}
277277
}
278+
279+
void copyExtraData(Team from) {
280+
extraData = from.getExtraData().copy();
281+
}
278282
}

common/src/main/java/dev/ftb/mods/ftbteams/data/TeamManagerImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,7 @@ public Pair<Integer, PartyTeam> createParty(UUID playerId, @Nullable ServerPlaye
414414
PartyTeam team = createPartyTeamInternal(playerId, player, name);
415415
if (description != null) team.setProperty(TeamProperties.DESCRIPTION, description);
416416
if (color != null) team.setProperty(TeamProperties.COLOR, color);
417+
team.copyExtraData(playerTeam);
417418

418419
playerTeam.setEffectiveTeam(team);
419420

0 commit comments

Comments
 (0)