Class TeamManager
java.lang.Object
net.minestom.server.scoreboard.TeamManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateBuilder
(@NotNull String name) Initializes a newTeamBuilder
for creating a teamcreateTeam
(@NotNull String name) Creates aTeam
with only the registry namecreateTeam
(String name, Component displayName, Component prefix, NamedTextColor teamColor, Component suffix) Creates aTeam
with the registry name, display name, prefix, suffix and the team colrocreateTeam
(String name, Component prefix, NamedTextColor teamColor, Component suffix) Creates aTeam
with the registry name, prefix, suffix and the team formatboolean
deleteTeam
(@NotNull String registryName) Deletes aTeam
boolean
deleteTeam
(@NotNull Team team) Deletes aTeam
boolean
Checks if the given name a registry name of a registeredTeam
boolean
Checks if the givenTeam
registeredgetEntities
(Team team) getPlayers
(Team team) Gets aTeam
with the given namegetTeams()
protected void
registerNewTeam
(@NotNull Team team) Registers a newTeam
-
Constructor Details
-
TeamManager
public TeamManager()Default constructor
-
-
Method Details
-
registerNewTeam
-
deleteTeam
-
deleteTeam
-
createBuilder
Initializes a newTeamBuilder
for creating a team- Parameters:
name
- The registry name of the team- Returns:
- the team builder
-
createTeam
-
createTeam
-
createTeam
public Team createTeam(String name, Component displayName, Component prefix, NamedTextColor teamColor, Component suffix) Creates aTeam
with 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
Team
with a prefix, teamColor, suffix and the display name
-
getTeam
-
exists
-
exists
-
getPlayers
-
getEntities
Gets aList
with all registeredLivingEntity
in 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
List
with all registeredLivingEntity
-
getTeams
-