> ## Documentation Index
> Fetch the complete documentation index at: https://velas.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Team API: Configure Properties and Manage Members

> Team configures visual and gameplay properties for a scoreboard team and manages player and entity members. All setters support fluent method chaining.

`Team` represents a Minecraft scoreboard team with configurable visual and gameplay properties. Obtain one via `scoreboard.team(String)`. Most setters return `this` for fluent chaining.

## Visual properties

| Method                | Returns     | Description            |
| --------------------- | ----------- | ---------------------- |
| `getName()`           | `String`    | The team's name        |
| `setColor(TeamColor)` | `Team`      | Set the team color     |
| `getColor()`          | `TeamColor` | Get the current color  |
| `setPrefix(String)`   | `Team`      | Set the chat prefix    |
| `getPrefix()`         | `String`    | Get the current prefix |
| `setSuffix(String)`   | `Team`      | Set the chat suffix    |
| `getSuffix()`         | `String`    | Get the current suffix |

## Gameplay rules

| Method                                        | Returns                 | Description                               |
| --------------------------------------------- | ----------------------- | ----------------------------------------- |
| `setFriendlyFire(boolean)`                    | `Team`                  | Enable/disable player friendly fire       |
| `isFriendlyFireEnabled()`                     | `boolean`               | Current friendly fire state               |
| `setEntitiesFriendlyFire(boolean)`            | `Team`                  | Enable/disable entity friendly fire       |
| `isEntitiesFriendlyFireEnabled()`             | `boolean`               | Current entity friendly fire state        |
| `setCanSeeFriendlyInvisibilities(boolean)`    | `Team`                  | Enable/disable seeing invisible teammates |
| `canSeeFriendlyInvisibilities()`              | `boolean`               | Current state                             |
| `setTeamCollisionRule(TeamCollisionRule)`     | `Team`                  | Set collision rule                        |
| `getCollisionRule()`                          | `TeamCollisionRule`     | Current collision rule                    |
| `setNameTagVisibility(TeamNameTagVisibility)` | `Team`                  | Set name tag visibility                   |
| `getNameTagVisibility()`                      | `TeamNameTagVisibility` | Current name tag visibility               |

## Member management

| Method                                           | Returns   | Description                     |
| ------------------------------------------------ | --------- | ------------------------------- |
| `addPlayer(Player)`                              | `Team`    | Add a player to the team        |
| `addPlayer(Player, AddMemberToTeamEvent.Reason)` | `Team`    | Add player with explicit reason |
| `removePlayer(Player)`                           | `Team`    | Remove a player from the team   |
| `addEntity(Entity)`                              | `Team`    | Add an entity                   |
| `removeEntity(Entity)`                           | `Team`    | Remove an entity                |
| `hasPlayer(Player)`                              | `boolean` | Check if player is on this team |
| `hasEntity(Entity)`                              | `boolean` | Check if entity is on this team |

## Example

```java theme={null}
Team blue = scoreboard.team("blue")
    .setColor(TeamColor.BLUE)
    .setPrefix("§9[Blue] ")
    .setSuffix(" §9●")
    .setFriendlyFire(false)
    .setTeamCollisionRule(TeamCollisionRule.FOR_OWN_TEAM)
    .setNameTagVisibility(TeamNameTagVisibility.ALWAYS)
    .addPlayer(player);
```
