Package net.minestom.server.scoreboard
Class TeamBuilder
java.lang.Object
net.minestom.server.scoreboard.TeamBuilder
public class TeamBuilder
extends java.lang.Object
A builder which represents a fluent Object to built teams.
-
Constructor Summary
Constructors Constructor Description TeamBuilder(java.lang.String name, TeamManager teamManager)
Creates an team builder. -
Method Summary
Modifier and Type Method Description TeamBuilder
allowFriendlyFire()
Changes the friendly flags for allow friendly fire without an update packet.Team
build()
Built a team.TeamBuilder
collisionRule(TeamsPacket.CollisionRule rule)
Changes theTeamsPacket.CollisionRule
of theTeam
without an update packet.TeamBuilder
friendlyFlags(byte flag)
Changes the friendly flags of theTeam
without an update packet.TeamBuilder
nameTagVisibility(TeamsPacket.NameTagVisibility visibility)
Changes theTeamsPacket.NameTagVisibility
of theTeam
without an update packet.TeamBuilder
prefix(java.lang.String prefix)
Changes the prefix of theTeam
without an update packet.TeamBuilder
prefix(ColoredText prefix)
Changes the prefix of theTeam
without an update packet.TeamBuilder
seeInvisiblePlayers()
Changes the friendly flags to sees invisible players of own team without an update packet.TeamBuilder
suffix(java.lang.String suffix)
Changes the suffix of theTeam
without an update packet.TeamBuilder
suffix(ColoredText suffix)
Changes the suffix of theTeam
without an update packet.TeamBuilder
teamColor(ChatColor color)
Changes the color of theTeam
without an update packet.TeamBuilder
teamDisplayName(java.lang.String displayName)
Changes the display name of theTeam
without an update packet.TeamBuilder
teamDisplayName(ColoredText displayName)
Changes the display name of theTeam
without an update packet.TeamBuilder
updateAllowFriendlyFire()
Updates the friendly flags for allow friendly fire.TeamBuilder
updateCollisionRule(TeamsPacket.CollisionRule rule)
Updates theTeamsPacket.CollisionRule
of theTeam
.TeamBuilder
updateFriendlyFlags(byte flag)
Updates the friendly flags of theTeam
.TeamBuilder
updateNameTagVisibility(TeamsPacket.NameTagVisibility visibility)
Updates theTeamsPacket.NameTagVisibility
of theTeam
.TeamBuilder
updatePrefix(java.lang.String prefix)
Updates the prefix of theTeam
.TeamBuilder
updatePrefix(ColoredText prefix)
Updates the prefix of theTeam
.TeamBuilder
updateSeeInvisiblePlayers()
Updates the friendly flags to sees invisible players of own team.TeamBuilder
updateSuffix(java.lang.String suffix)
Updates the suffix of theTeam
.TeamBuilder
updateSuffix(ColoredText suffix)
Updates the suffix of theTeam
.TeamBuilder
updateTeamColor(ChatColor color)
Updates the color of theTeam
.TeamBuilder
updateTeamDisplayName(java.lang.String displayName)
Updates the display name of theTeam
.TeamBuilder
updateTeamDisplayName(ColoredText displayName)
Updates the display name of theTeam
.TeamBuilder
updateTeamPacket()
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
-
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
-
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
-
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
-
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
-
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
-
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
-