Class DatabaseHandler
java.lang.Object
fr.multimc.api.commons.data.handlers.DatabaseHandler
- All Implemented Interfaces:
ITeamHandler
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a team to the databaseGet all the players sorted by team codeGet all the team scores sorted by team codeGet all the team names sorted by team codevoidSet all the team scores
-
Constructor Details
-
DatabaseHandler
Create a new DatabaseHandler- Parameters:
database-Databaseto use
-
-
Method Details
-
addTeam
Add a team to the database -
getPlayersByTeam
Description copied from interface:ITeamHandlerGet all the players sorted by team code- Specified by:
getPlayersByTeamin interfaceITeamHandler- Returns:
Map<String,List<String>> with team code as key and player usernames as value
-
getTeamNamesByTeam
Description copied from interface:ITeamHandlerGet all the team names sorted by team code- Specified by:
getTeamNamesByTeamin interfaceITeamHandler- Returns:
Map<String,String> with team code as key and team name as value
-
getScores
Description copied from interface:ITeamHandlerGet all the team scores sorted by team code- Specified by:
getScoresin interfaceITeamHandler- Returns:
Map<String,Integer> with team code as key and team score as value
-
setScores
Description copied from interface:ITeamHandlerSet all the team scores- Specified by:
setScoresin interfaceITeamHandler- Parameters:
scores-Map<String,Integer> with team code as key and team score as value
-