Package net.minestom.server.scoreboard
Class TeamBuilder
java.lang.Object
net.minestom.server.scoreboard.TeamBuilder
A builder which represents a fluent Object to built teams.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionChanges the friendly flags for allow friendly fire without an update packet.build()
Built a team.Changes theTeamsPacket.CollisionRule
of theTeam
without an update packet.friendlyFlags
(byte flag) Changes the friendly flags of theTeam
without an update packet.nameTagVisibility
(TeamsPacket.NameTagVisibility visibility) Changes theTeamsPacket.NameTagVisibility
of theTeam
without an update packet.Changes the prefix of theTeam
without an update packet.Changes the friendly flags to sees invisible players of own team without an update packet.Changes the suffix of theTeam
without an update packet.teamColor
(NamedTextColor color) Changes the color of theTeam
without an update packet.teamDisplayName
(Component displayName) Changes the display name of theTeam
without an update packet.Updates the friendly flags for allow friendly fire.Updates theTeamsPacket.CollisionRule
of theTeam
.updateFriendlyFlags
(byte flag) Updates the friendly flags of theTeam
.updateNameTagVisibility
(TeamsPacket.NameTagVisibility visibility) Updates theTeamsPacket.NameTagVisibility
of theTeam
.updatePrefix
(Component prefix) Updates the prefix of theTeam
.Updates the friendly flags to sees invisible players of own team.updateSuffix
(Component suffix) Updates the suffix of theTeam
.updateTeamColor
(NamedTextColor color) Updates the color of theTeam
.updateTeamDisplayName
(Component displayName) Updates the display name of theTeam
.Allows to send an update packet when the team is built.
-
Constructor Details
-
TeamBuilder
Creates an team builder.- Parameters:
name
- The name of the new teamteamManager
- The manager for the team
-
-
Method Details
-
updatePrefix
Updates the prefix of theTeam
.- Parameters:
prefix
- The new prefix- Returns:
- this builder, for chaining
-
updateTeamColor
Updates the color of theTeam
.- Parameters:
color
- The new color- Returns:
- this builder, for chaining
-
updateSuffix
Updates the suffix of theTeam
.- Parameters:
suffix
- The new suffix- Returns:
- this builder, for chaining
-
updateTeamDisplayName
Updates the display name of theTeam
.- Parameters:
displayName
- The new display name- Returns:
- this builder, for chaining
-
updateCollisionRule
Updates theTeamsPacket.CollisionRule
of theTeam
.- Parameters:
rule
- The new rule- Returns:
- this builder, for chaining
-
updateNameTagVisibility
Updates theTeamsPacket.NameTagVisibility
of theTeam
.- Parameters:
visibility
- The new tag visibility- Returns:
- this builder, for chaining
-
updateFriendlyFlags
Updates the friendly flags of theTeam
.- Parameters:
flag
- The new friendly flag- Returns:
- this builder, for chaining
-
updateAllowFriendlyFire
Updates the friendly flags for allow friendly fire.- Returns:
- this builder, for chaining
-
updateSeeInvisiblePlayers
Updates the friendly flags to sees invisible players of own team.- Returns:
- this builder, for chaining
-
prefix
Changes the prefix of theTeam
without an update packet.
Warning: If you do not callupdateTeamPacket()
, this is only changed of the server side.- Parameters:
prefix
- The new prefix- Returns:
- this builder, for chaining
-
suffix
Changes the suffix of theTeam
without an update packet.
Warning: If you do not callupdateTeamPacket()
, this is only changed of the server side.- Parameters:
suffix
- The new suffix- Returns:
- this builder, for chaining
-
teamColor
Changes the color of theTeam
without an update packet.
Warning: If you do not callupdateTeamPacket()
, this is only changed of the server side.- Parameters:
color
- The new team color- Returns:
- this builder, for chaining
-
teamDisplayName
Changes the display name of theTeam
without an update packet.
Warning: If you do not callupdateTeamPacket()
, this is only changed of the server side.- Parameters:
displayName
- The new display name- Returns:
- this builder, for chaining
-
collisionRule
Changes theTeamsPacket.CollisionRule
of theTeam
without an update packet.
Warning: If you do not callupdateTeamPacket()
, this is only changed of the server side.- Parameters:
rule
- The new rule- Returns:
- this builder, for chaining
-
nameTagVisibility
Changes theTeamsPacket.NameTagVisibility
of theTeam
without an update packet.
Warning: If you do not callupdateTeamPacket()
, this is only changed of the server side.- Parameters:
visibility
- The new tag visibility- Returns:
- this builder, for chaining
-
friendlyFlags
Changes the friendly flags of theTeam
without an update packet.
Warning: If you do not callupdateTeamPacket()
, this is only changed of the server side.- Parameters:
flag
- The new flag- Returns:
- this builder, for chaining
-
allowFriendlyFire
Changes the friendly flags for allow friendly fire without an update packet.
Warning: If you do not callupdateTeamPacket()
, this is only changed of the server side.- Returns:
- this builder, for chaining
-
seeInvisiblePlayers
Changes the friendly flags to sees invisible players of own team without an update packet.
Warning: If you do not callupdateTeamPacket()
, this is only changed of the server side.- Returns:
- this builder, for chaining
-
updateTeamPacket
Allows to send an update packet when the team is built.- Returns:
- this builder, for chaining
-
build
Built a team.- Returns:
- the built team
-