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:
Teriuihi 2025-01-24 21:14:39 +01:00
parent fcf5dc7b7c
commit 076f39279e
2 changed files with 5 additions and 0 deletions

View File

@ -62,6 +62,7 @@ public class Main extends JavaPlugin {
return;
}
gameManager.clearTeams();
teams.stream()
.collect(Collectors.groupingBy(Team::getId, Collectors.counting()))
.forEach((id, count) -> {

View File

@ -80,4 +80,8 @@ public class GameManager {
}
return gamePhaseExecutor;
}
public void clearTeams() {
teams.clear();
}
}