# ITeam
> Represents a team in the Lead system.
`gg.lode.leadapi.api.ITeam`
---
## Signature
```java
public interface ITeam
```
---
## Methods
### getId
```java
String getId()
```
Returns the team's string ID.
**Returns:** `String` — The team ID.
---
### setId
```java
void setId(String id)
```
Sets the team's ID.
| Parameter | Type | Description |
|---|---|---|
| `id` | `String` | The new team ID. |
---
### getName
```java
String getName()
```
Returns the team's display name.
**Returns:** `String` — The team name.
---
### setName
```java
void setName(String name)
```
Sets the team's display name.
| Parameter | Type | Description |
|---|---|---|
| `name` | `String` | The new display name. |
---
### getNameAsNumber
```java
int getNameAsNumber() throws NumberFormatException
```
Parses and returns the team's name as an integer.
**Returns:** `int` — The team name as a number.
**Throws:** `NumberFormatException` — If the name is not numeric.
---
### getUniqueId
```java
UUID getUniqueId()
```
Returns the team's internal UUID.
**Returns:** `UUID` — The team's unique identifier.
---
### getColor
```java
String getColor()
```
Returns the team's hex color code (e.g., `"#FF0000"`).
**Returns:** `String` — The hex color string.
---
### setColor
```java
void setColor(String color)
```
Sets the team's color.
| Parameter | Type | Description |
|---|---|---|
| `color` | `String` | A hex color value (e.g., `"#ff0000"` or `"ff0000"`). |
---
### getLeaderUniqueId
```java
@Nullable UUID getLeaderUniqueId()
```
Returns the UUID of the team leader.
**Returns:** `UUID` — The leader's UUID, or `null` if no leader is set.
---
### getMembers
```java
List<ITeamMember> getMembers()
```
Returns the list of all team members.
**Returns:** `List<ITeamMember>` — All members.
---
### containsMember
```java
boolean containsMember(UUID uniqueId)
```
Checks if a player is a member of the team.
| Parameter | Type | Description |
|---|---|---|
| `uniqueId` | `UUID` | The player's unique ID. |
**Returns:** `boolean` — `true` if the player is a member.
---
### getMember
```java
@Nullable ITeamMember getMember(UUID uniqueId)
```
Retrieves the team member for a given UUID.
| Parameter | Type | Description |
|---|---|---|
| `uniqueId` | `UUID` | The player's unique ID. |
**Returns:** `ITeamMember` — The member, or `null` if not found.
---
### addMember (Player)
```java
void addMember(Player player)
```
Adds an online player to the team.
| Parameter | Type | Description |
|---|---|---|
| `player` | `Player` | The player to add. |
---
### addMember (ITeamMember)
```java
void addMember(ITeamMember player)
```
Adds a team member to the team.
| Parameter | Type | Description |
|---|---|---|
| `player` | `ITeamMember` | The member to add. |
---
### removeMember
```java
void removeMember(UUID uniqueId)
```
Removes a player from the team. Does nothing if the player is not in the team. You must manually notify the team about the removal.
| Parameter | Type | Description |
|---|---|---|
| `uniqueId` | `UUID` | The player's unique ID. |
---
### getInvitations
```java
List<UUID> getInvitations()
```
Returns an immutable list of UUIDs representing active invitations. **Read only.**
**Returns:** `List<UUID>` — Active invitation UUIDs.
---
### addInvitation
```java
void addInvitation(UUID uniqueId)
```
Adds a player to the team's invitation list.
| Parameter | Type | Description |
|---|---|---|
| `uniqueId` | `UUID` | The player's unique ID. |
---
### removeInvitation
```java
void removeInvitation(UUID uniqueId)
```
Removes a player from the team's invitation list.
| Parameter | Type | Description |
|---|---|---|
| `uniqueId` | `UUID` | The player's unique ID. |
---
### setSpawnLocation
```java
void setSpawnLocation(@Nullable Location location)
```
Sets the spawn location for the team. Pass `null` to clear it.
| Parameter | Type | Description |
|---|---|---|
| `location` | `Location` | The new spawn location, or `null` to clear. |
---
### getSpawnLocation
```java
@Nullable Location getSpawnLocation()
```
Retrieves the spawn location of the team.
**Returns:** `Location` — The spawn location, or `null` if not set.
---
### setColorName
```java
void setColorName(boolean value)
```
Sets whether team member names should be colored with the team color.
| Parameter | Type | Description |
|---|---|---|
| `value` | `boolean` | `true` to enable colored names. |
---
### shouldColorName
```java
boolean shouldColorName()
```
Returns whether team member names should be colored with the team color.
**Returns:** `boolean` — `true` if colored names are enabled.
---
### setCollidable
```java
void setCollidable(Team.OptionStatus status)
```
Sets the collision rule for team members.
| Parameter | Type | Description |
|---|---|---|
| `status` | `Team.OptionStatus` | The collision rule (`org.bukkit.scoreboard.Team.OptionStatus`). |
---
### getCollidable
```java
Team.OptionStatus getCollidable()
```
Returns the collision rule for team members.
**Returns:** `Team.OptionStatus` — The current collision rule.
---
### setNameTagVisibility
```java
void setNameTagVisibility(Team.OptionStatus status)
```
Sets the name tag visibility rule for team members.
| Parameter | Type | Description |
|---|---|---|
| `status` | `Team.OptionStatus` | The visibility rule. |
---
### getNameTagVisibility
```java
Team.OptionStatus getNameTagVisibility()
```
Returns the name tag visibility rule.
**Returns:** `Team.OptionStatus` — The current visibility rule.
---
### setFriendlyFireAllowed
```java
void setFriendlyFireAllowed(boolean value)
```
Sets whether friendly fire (damage between team members) is allowed.
| Parameter | Type | Description |
|---|---|---|
| `value` | `boolean` | `true` to allow friendly fire. |
---
### isFriendlyFireAllowed
```java
boolean isFriendlyFireAllowed()
```
Returns whether friendly fire is allowed.
**Returns:** `boolean` — `true` if friendly fire is enabled.
---
### save
```java
void save(FileConfiguration file)
```
Saves the team's state to a specific `FileConfiguration`. Use with caution — typically for backups or external data handling.
| Parameter | Type | Description |
|---|---|---|
| `file` | `FileConfiguration` | The configuration to save to. |
---
## Related Pages
- [[ILeadAPI]] — Retrieve teams via the main API
- [[ITeamMember]] — Individual team members
- [[GeneratorType]] — Strategies for generating team identifiers