> For the complete documentation index, see [llms.txt](https://realisticnode.gitbook.io/rnsetups/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://realisticnode.gitbook.io/rnsetups/rnkoth/guides/teams.md).

# Teams and clans

Play solo, with vanilla scoreboard teams, or with any clan, faction or town plugin through PlaceholderAPI.

By default every player fights for themselves. With teams, players of the same team are one **side**: they capture together, they do not contest each other, and they win together.

```yaml
# config.yml
teams:
  mode: solo
  placeholder: '%simpleclans_clan_tag%'
  no-team-values: ['', 'none', 'wilderness', 'no clan', 'null']
```

## Modes

| `teams.mode`     | How players are grouped                                                        |
| ---------------- | ------------------------------------------------------------------------------ |
| `solo` (default) | Every player alone.                                                            |
| `scoreboard`     | Vanilla scoreboard teams (`/team`).                                            |
| `placeholder`    | Any clan, faction, party or town plugin, through a PlaceholderAPI placeholder. |

You can change it in `/koth editor` → General settings → **Teams**.

## What changes with teams

* Players of one team inside the area capture **together**. Two teams inside make it contested.
* The progress, points and time belong to the team. Messages and the boss bar show the team name.
* **Winner rewards** go to every member of the winning team who stood in the KOTH and counted. Members who never stepped in get nothing.
* The **loot chest** goes to the member who stood inside the longest.
* **Holder kill** rewards are only given for killing a holder of another team, and kills of a teammate never count for the **Kills** stat.
* With `contested: majority`, the team with more players inside keeps gaining. With `holder`, the team that was already gaining keeps it until it is killed or pushed out; with `everyone`, every team inside gains at the same time.

Players without a team play alone, as in `solo`.

## Scoreboard teams

```yaml
teams:
  mode: scoreboard
```

Uses the teams of the main scoreboard, the ones made with the vanilla `/team` command or by plugins that use it (many minigame and event plugins do). The team **display name** is shown to players.

```
/team add red
/team modify red displayName "Red Team"
/team join red Steve
```

{% hint style="warning" %}
Folia has no scoreboard teams. On Folia, use `mode: placeholder` with your clan plugin. The console warns you if `scoreboard` is set on Folia.
{% endhint %}

## Placeholder teams (clans, factions, towns)

```yaml
teams:
  mode: placeholder
  placeholder: '%simpleclans_clan_tag%'
```

Needs [PlaceholderAPI](https://modrinth.com/plugin/placeholderapi) and the expansion of your clan plugin. The text the placeholder gives for a player is their team: players with the same text are on the same team.

| Plugin        | Placeholder                   |
| ------------- | ----------------------------- |
| SimpleClans   | `%simpleclans_clan_tag%`      |
| FactionsUUID  | `%factionsuuid_faction_name%` |
| Towny         | `%townyadvanced_town%`        |
| UltimateClans | `%uclans_clan_name%`          |

Any other plugin works the same way: use a placeholder that shows the name or tag of the player's clan, party or nation.

Test your placeholder first with `/papi parse <player> %your_placeholder%`. It must show the clan name for a player in a clan, and an empty text (or a word like `none`) for a player without one.

### Players without a clan

Many plugins return a word instead of an empty text for players without a clan, like `Wilderness` or `No clan`. Put those words in `no-team-values` so those players play alone instead of being one big team:

```yaml
teams:
  no-team-values: ['', 'none', 'wilderness', 'no clan', 'null']
```

Capital letters and colors do not matter.

{% hint style="info" %}
If PlaceholderAPI is not installed, or the placeholder is not filled in by any plugin (it stays as `%...%`), every player plays alone.
{% endhint %}

## Solo in one KOTH only

Each KOTH can ignore the teams:

```yaml
# koths/<name>.yml
teams: solo      # default = as config.yml says
```

`default` uses `teams.mode` of `config.yml`. `solo` makes every player play alone in this KOTH, for example for a free-for-all event while the rest of the server uses clans. The same in `/koth editor <name>` → **Teams**.

With players on their own (here or with `teams.mode: solo`), use `contested: holder` or `contested: everyone`: with `majority` every side has one player, so it is always a tie and nobody gains. See [Contested areas](/rnsetups/rnkoth/guides/modes.md#contested-areas-contested).
