RedstoneFuture / missilewars

MissileWars is a famous, fun and fast minigame spigot-plugin for Minecraft
https://www.spigotmc.org/resources/62947
GNU General Public License v3.0
13 stars 9 forks source link

Adding TaskManager, Fixing player-data reset & scoreboard issue #94

Closed RedstoneFuture closed 1 year ago

RedstoneFuture commented 1 year ago

The class Games.java is the central object for a game. However, some methods and fields can be outsourced to manager classes to keep the Games class a bit more manageable. The following is a suggestion for outsourcing:

Games.java

Moving from Game.java to TaskManager.java


With this investigation, a runtime issue was also found and fixed that did not correctly reset the player datas after the GameState.END phase, because the EventListeners were already disabled. In addition, the game duration (currently for the scoreboard) was cached for the GameState.END phase.