Merge pull request 'Shuffle new leader selection' (#388) from shufflePlayer into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Reviewed-on: #388 Reviewed-by: YoyoNow <jwsteam@nidido.de>
Dieser Commit ist enthalten in:
Commit
461157714d
@ -219,7 +219,9 @@ public class FightTeam {
|
|||||||
playerSet.forEach(p -> addMember(p, true));
|
playerSet.forEach(p -> addMember(p, true));
|
||||||
|
|
||||||
if(ArenaMode.VariableTeams.contains(Config.mode) && isLeaderless()){
|
if(ArenaMode.VariableTeams.contains(Config.mode) && isLeaderless()){
|
||||||
for(Player player : Bukkit.getOnlinePlayers()){
|
List<Player> onlinePlayers = new ArrayList<>(Bukkit.getOnlinePlayers());
|
||||||
|
Collections.shuffle(onlinePlayers);
|
||||||
|
for(Player player : onlinePlayers) {
|
||||||
if(Fight.getPlayerTeam(player) == null && canbeLeader(player)){
|
if(Fight.getPlayerTeam(player) == null && canbeLeader(player)){
|
||||||
addMember(player);
|
addMember(player);
|
||||||
break;
|
break;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren