Velocitab/docs/Plugin-Message-API.md
William c23fdd1ff6
feat: Add support for Minecraft 1.20.5 (#186)
* feat: support Minecraft 1.20.5

* build: bump to 1.6.5

* refactor: optimize imports

* docs: update about menu author credits

* docs: update velocity meta author credits

* docs: update URL

* refactor: use Minedown from new repo

* docs: shorten name of Plugin Message API docs page

* deps: bump minimum Velocity version to 380
2024-04-23 16:23:36 +01:00

28 lines
1017 B
Markdown

Velocitab provides a plugin message API.
## API Requests from Backend Plugins
### 1 Changing player's username in the TAB List
To change a player's username in the tablist, you can send a plugin message with the channel `velocitab:update_custom_name` and as data `customName`.
Remember to replace `customName` with the desired name.
<details>
<summary>Example &mdash; Changing player's username in the TAB List</summary>
```java
player.sendPluginMessage(plugin, "velocitab:update_custom_name", "Steve".getBytes());
```
</details>
### 2 Update team color
To change a player's team color in the TAB List, you can send a plugin message with the channel `velocitab:update_team_color` and as data `teamColor`.
You can only use legacy color codes, for example `a` for green, `b` for aqua, etc.
This option overrides the glow effect if set
<details>
<summary>Example &mdash; Changing player's team color</summary>
```java
player.sendPluginMessage(plugin, "velocitab:update_team_color", "a".getBytes());
```
</details>