Package net.minestom.server.scoreboard
Class TeamManager
java.lang.Object
net.minestom.server.scoreboard.TeamManager
An object which manages all the
Team's-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateBuilder(@NotNull String name) Initializes a newTeamBuilderfor creating a teamcreateTeam(@NotNull String name) Creates aTeamwith only the registry namecreateTeam(String name, Component displayName, Component prefix, NamedTextColor teamColor, Component suffix) Creates aTeamwith the registry name, display name, prefix, suffix and the team colrocreateTeam(String name, Component prefix, NamedTextColor teamColor, Component suffix) Creates aTeamwith the registry name, prefix, suffix and the team formatbooleandeleteTeam(@NotNull String registryName) Deletes aTeambooleandeleteTeam(@NotNull Team team) Deletes aTeambooleanChecks if the given name a registry name of a registeredTeambooleanChecks if the givenTeamregisteredgetEntities(Team team) getPlayers(Team team) Gets aTeamwith the given namegetTeams()protected voidregisterNewTeam(@NotNull Team team) Registers a newTeam
-
Constructor Details
-
TeamManager
public TeamManager()Default constructor
-
-
Method Details
-
registerNewTeam
Registers a newTeam- Parameters:
team- The team to be registered
-
deleteTeam
Deletes aTeam- Parameters:
registryName- The registry name of team- Returns:
trueif the team was deleted, otherwisefalse
-
deleteTeam
Deletes aTeam- Parameters:
team- The team to be deleted- Returns:
trueif the team was deleted, otherwisefalse
-
createBuilder
Initializes a newTeamBuilderfor creating a team- Parameters:
name- The registry name of the team- Returns:
- the team builder
-
createTeam
Creates aTeamwith only the registry name- Parameters:
name- The registry name- Returns:
- the created
Team
-
createTeam
Creates aTeamwith the registry name, prefix, suffix and the team format- Parameters:
name- The registry nameprefix- The team prefixteamColor- The team formatsuffix- The team suffix- Returns:
- the created
Teamwith a prefix, teamColor and suffix
-
createTeam
public Team createTeam(String name, Component displayName, Component prefix, NamedTextColor teamColor, Component suffix) Creates aTeamwith the registry name, display name, prefix, suffix and the team colro- Parameters:
name- The registry namedisplayName- The display nameprefix- The team prefixteamColor- The team colorsuffix- The team suffix- Returns:
- the created
Teamwith a prefix, teamColor, suffix and the display name
-
getTeam
Gets aTeamwith the given name- Parameters:
teamName- The registry name of the team- Returns:
- a registered
Teamornull
-
exists
Checks if the given name a registry name of a registeredTeam- Parameters:
teamName- The name of the team- Returns:
trueif the team is registered, otherwisefalse
-
exists
Checks if the givenTeamregistered- Parameters:
team- The searched team- Returns:
trueif the team is registered, otherwisefalse
-
getPlayers
Gets aListwith all registeredPlayerin the team
Note: The list exclude all entities. To get all entities of the team, you can usegetEntities(Team) -
getEntities
Gets aListwith all registeredLivingEntityin the team
Note: The list exclude all players. To get all players of the team, you can usegetPlayers(Team)- Parameters:
team- The team- Returns:
- a
Listwith all registeredLivingEntity
-
getTeams
-