Gameplay Manager
The GameplayManager class manages the coordination, assignment, and interaction of players and teams within the game. It provides methods for team creation, player management, and team-player relationships.
Properties
Functions
Link copied to clipboard
Adds a player to a specified team, handling their removal from any previous team.
Link copied to clipboard
Creates a new team with specified parameters.
Link copied to clipboard
Deletes a team and properly handles removal of all its players.
Link copied to clipboard
Retrieves the ModPlayers object associated with a ServerPlayer.
Link copied to clipboard
Handles player join event by creating a new ModPlayers object and assigning them to a team.
Link copied to clipboard
Handles player leave event by removing them from their team and the player list.
Link copied to clipboard
Removes a player from their current team.
Link copied to clipboard
Finds the team with the lowest number of players.