Class TeamBuilder

java.lang.Object
net.minestom.server.scoreboard.TeamBuilder

public class TeamBuilder extends Object
A builder which represents a fluent Object to built teams.
  • Constructor Details

    • TeamBuilder

      public TeamBuilder(String name, TeamManager teamManager)
      Creates an team builder.
      Parameters:
      name - The name of the new team
      teamManager - The manager for the team
  • Method Details

    • updatePrefix

      public TeamBuilder updatePrefix(Component prefix)
      Updates the prefix of the Team.
      Parameters:
      prefix - The new prefix
      Returns:
      this builder, for chaining
    • updateTeamColor

      public TeamBuilder updateTeamColor(NamedTextColor color)
      Updates the color of the Team.
      Parameters:
      color - The new color
      Returns:
      this builder, for chaining
    • updateSuffix

      public TeamBuilder updateSuffix(Component suffix)
      Updates the suffix of the Team.
      Parameters:
      suffix - The new suffix
      Returns:
      this builder, for chaining
    • updateTeamDisplayName

      public TeamBuilder updateTeamDisplayName(Component displayName)
      Updates the display name of the Team.
      Parameters:
      displayName - The new display name
      Returns:
      this builder, for chaining
    • updateCollisionRule

      public TeamBuilder updateCollisionRule(TeamsPacket.CollisionRule rule)
      Updates the TeamsPacket.CollisionRule of the Team.
      Parameters:
      rule - The new rule
      Returns:
      this builder, for chaining
    • updateNameTagVisibility

      public TeamBuilder updateNameTagVisibility(TeamsPacket.NameTagVisibility visibility)
      Parameters:
      visibility - The new tag visibility
      Returns:
      this builder, for chaining
    • updateFriendlyFlags

      public TeamBuilder updateFriendlyFlags(byte flag)
      Updates the friendly flags of the Team.
      Parameters:
      flag - The new friendly flag
      Returns:
      this builder, for chaining
    • updateAllowFriendlyFire

      public TeamBuilder updateAllowFriendlyFire()
      Updates the friendly flags for allow friendly fire.
      Returns:
      this builder, for chaining
    • updateSeeInvisiblePlayers

      public TeamBuilder updateSeeInvisiblePlayers()
      Updates the friendly flags to sees invisible players of own team.
      Returns:
      this builder, for chaining
    • prefix

      public TeamBuilder prefix(Component prefix)
      Changes the prefix of the Team without an update packet.

      Warning: If you do not call updateTeamPacket(), this is only changed of the server side.
      Parameters:
      prefix - The new prefix
      Returns:
      this builder, for chaining
    • suffix

      public TeamBuilder suffix(Component suffix)
      Changes the suffix of the Team without an update packet.

      Warning: If you do not call updateTeamPacket(), this is only changed of the server side.
      Parameters:
      suffix - The new suffix
      Returns:
      this builder, for chaining
    • teamColor

      public TeamBuilder teamColor(NamedTextColor color)
      Changes the color of the Team without an update packet.

      Warning: If you do not call updateTeamPacket(), this is only changed of the server side.
      Parameters:
      color - The new team color
      Returns:
      this builder, for chaining
    • teamDisplayName

      public TeamBuilder teamDisplayName(Component displayName)
      Changes the display name of the Team without an update packet.

      Warning: If you do not call updateTeamPacket(), this is only changed of the server side.
      Parameters:
      displayName - The new display name
      Returns:
      this builder, for chaining
    • collisionRule

      public TeamBuilder collisionRule(TeamsPacket.CollisionRule rule)
      Changes the TeamsPacket.CollisionRule of the Team without an update packet.

      Warning: If you do not call updateTeamPacket(), this is only changed of the server side.
      Parameters:
      rule - The new rule
      Returns:
      this builder, for chaining
    • nameTagVisibility

      public TeamBuilder nameTagVisibility(TeamsPacket.NameTagVisibility visibility)
      Changes the TeamsPacket.NameTagVisibility of the Team without an update packet.

      Warning: If you do not call updateTeamPacket(), this is only changed of the server side.
      Parameters:
      visibility - The new tag visibility
      Returns:
      this builder, for chaining
    • friendlyFlags

      public TeamBuilder friendlyFlags(byte flag)
      Changes the friendly flags of the Team without an update packet.

      Warning: If you do not call updateTeamPacket(), this is only changed of the server side.
      Parameters:
      flag - The new flag
      Returns:
      this builder, for chaining
    • allowFriendlyFire

      public TeamBuilder allowFriendlyFire()
      Changes the friendly flags for allow friendly fire without an update packet.

      Warning: If you do not call updateTeamPacket(), this is only changed of the server side.
      Returns:
      this builder, for chaining
    • seeInvisiblePlayers

      public TeamBuilder seeInvisiblePlayers()
      Changes the friendly flags to sees invisible players of own team without an update packet.

      Warning: If you do not call updateTeamPacket(), this is only changed of the server side.
      Returns:
      this builder, for chaining
    • updateTeamPacket

      public TeamBuilder updateTeamPacket()
      Allows to send an update packet when the team is built.
      Returns:
      this builder, for chaining
    • build

      public Team build()
      Built a team.
      Returns:
      the built team