Add method to clear teams in GameManager
Introduced a `clearTeams` method in `GameManager` to reset the teams list. Updated `Main.java` to call this method, ensuring teams are cleared before processing.
This commit is contained in:
@@ -62,6 +62,7 @@ public class Main extends JavaPlugin {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gameManager.clearTeams();
|
||||||
teams.stream()
|
teams.stream()
|
||||||
.collect(Collectors.groupingBy(Team::getId, Collectors.counting()))
|
.collect(Collectors.groupingBy(Team::getId, Collectors.counting()))
|
||||||
.forEach((id, count) -> {
|
.forEach((id, count) -> {
|
||||||
|
|||||||
@@ -80,4 +80,8 @@ public class GameManager {
|
|||||||
}
|
}
|
||||||
return gamePhaseExecutor;
|
return gamePhaseExecutor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void clearTeams() {
|
||||||
|
teams.clear();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user