docs: further improve Nametags docs

This commit is contained in:
William278 2024-04-24 10:40:11 +01:00
parent 4d98b24c02
commit 8c02dfa296
No known key found for this signature in database

View File

@ -4,31 +4,31 @@ Velocitab supports formatting the nametags of players (the text displayed above
> **Note:** This feature requires sending Update Teams packets. `send_scoreboard_packets` must be enabled in the [`config.yml` file](config-file) for this to work. [More details...](sorting#compatibility-issues) > **Note:** This feature requires sending Update Teams packets. `send_scoreboard_packets` must be enabled in the [`config.yml` file](config-file) for this to work. [More details...](sorting#compatibility-issues)
## Setting name tags ## Customizing nametags
You can configure nametags per-group using the `nametags` section of the config file. Each group should have one nametag format associated with it, which will be applied to all players on servers in that group. You can configure nametags per-group using the `nametag` field in `tab_groups.yml`. Each group must have a nametag format associated with it, which will be applied to all players on servers in that group. Nametags are comprised of a prefix and suffix; the player's username will be displayed in-between.
<details> <details>
<summary>Editing nametags (tab_groups.yml)</summary> <summary>Editing nametags (tab_groups.yml)</summary>
```yaml ```yaml
# Nametag(s) to display above players' heads for each server group. Set to empty to disable. nametag:
# Nametag formats must contain a %username%. Docs: https://william278.net/docs/velocitab/nametags prefix: '&f%prefix%'
nametag: suffix: '&f%suffix%'
prefix: '&f%prefix%'
suffix: '&f%suffix%'
# (...)
# Whether to send scoreboard teams packets. Required for player list sorting and nametag formatting.
# Turn this off if you're using scoreboard teams on backend servers.
send_scoreboard_packets: true
``` ```
</details> </details>
Only players on servers which are part of groups that specify nametag formats will have their nametag formatted. To disable nametag formatting, remove all groups from the `nametags` section of the config file (leaving it empty). Only players on servers which are part of groups that specify nametag formats will have their nametag formatted. To disable nametag formatting, remove all groups from the `nametags` section of the config file (leaving it empty).
## Removing name tags ## Disabling nametags
In order to remove nametags, you must set `prefix` and `suffix` to empty. After that be sure to set `remove_nametags` to `true` in the [`config.yml` file](config-file). If you don't want Velocitab to format player nametags, set `prefix` and `suffix` to an empty string in each tab group (e.g., `prefix: ''`). You should also set `remove_nametags` to `true` in the [`config.yml` file](config-file).
<details>
<summary>Remove nametags option (config.yml)</summary>
```yaml
remove_nametags: true
```
</details>
## Formatting limitations ## Formatting limitations
Nametags must adhere to the following restrictions: Nametags must adhere to the following restrictions: