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

Refactoring of Games.java #80

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 Lobby.java

Moving from Game.java to Arena.java

Moving from Game.java to EquipmentManager.java

Moving from Game.java to TaskManager.java

daniel-naegele commented 1 year ago

This is definitely a good idea. I would split in this into smaller PRs, with the addition of the EquipmentManager, TaskManager each.

RedstoneFuture commented 1 year ago

I am not sure if moving the teleportTo methods is useful at the moment. I'm thinking about moving some player based methods (removePlayer, broadcast, startForPlayer, setPlayerAttributes, the teleport methods, ...) to a separate manager - but not yet.