diff --git a/src/main/java/armameeldoparti/utils/mixers/BySkillPointsMixer.java b/src/main/java/armameeldoparti/utils/mixers/BySkillPointsMixer.java index c73fdfa..060ab94 100644 --- a/src/main/java/armameeldoparti/utils/mixers/BySkillPointsMixer.java +++ b/src/main/java/armameeldoparti/utils/mixers/BySkillPointsMixer.java @@ -60,7 +60,7 @@ public List withoutAnchorages(List teams) { Map> playersMap = CommonFields.getPlayersSets(); for (Position position : Position.values()) { - List currentPlayersSet = playersMap.get(position); + List currentPlayersSet = new ArrayList<>(playersMap.get(position)); // Players sorted highest to lowest currentPlayersSet.sort(comparingInt(Player::getSkillPoints).reversed()); diff --git a/src/main/java/armameeldoparti/utils/mixers/RandomMixer.java b/src/main/java/armameeldoparti/utils/mixers/RandomMixer.java index 68b1780..55fe6e1 100644 --- a/src/main/java/armameeldoparti/utils/mixers/RandomMixer.java +++ b/src/main/java/armameeldoparti/utils/mixers/RandomMixer.java @@ -7,6 +7,7 @@ import armameeldoparti.utils.common.CommonFields; import armameeldoparti.utils.common.CommonFunctions; import armameeldoparti.utils.common.Constants; +import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; @@ -63,7 +64,7 @@ public List withoutAnchorages(List teams) { .getTeamPlayers(); for (Position position : Position.values()) { - List playersAtPosition = playersSets.get(position); + List playersAtPosition = new ArrayList<>(playersSets.get(position)); Collections.shuffle(playersAtPosition);