# 分组

### 关于

TAB 使用组来管理属性 (例如 TAB 前缀) 和排列玩家 (如果你启用了这个功能). 在 TAB 中有 2 种方法设置组到的优先级、

第一个方法是与你的权限组插件挂钩并且获取其中的组。同时你的权限组插件必须是受 TAB 支持的插件。\
**支持的权限组插件**: **LuckPerms** 和 **UltraPermissions** 可直接挂钩，但是其他权限组插件也可以提供 **Vault** 间接挂钩。\
如果你的权限组插件不受支持，你也可以尝试方法 2。

### 方法1: 使用权限组设置优先级

这是 TAB 默认使用的方法。TAB 会获取你的玩家所在的权限组插件中的组。

将玩家加入到你的权限组的组（不要忘记配置它们的 weight - 如果你是使用 LuckPerms 可以使用指令 /lp group <组> setweight <数字> 来配置)。\
验证玩家当前在 TAB 中的组可以使用指令 `/tab debug <玩家>`。它会提示 `Primary permission group: <组的名称>`。这样你就可以检查 TAB 是否与你的权限组插件挂钩了。

### 方法2: 权限节点

如果上面这个方法不管用，或者你就喜欢权限节点，那么你可以试试这个方法。

1. 打开 [config.yml](https://github.com/NEZNAMY/TAB/wiki/config.yml) 并设置 [`assign-groups-by-permissions: true`](https://github.com/NEZNAMY/TAB/wiki/config.yml#assign-groups-by-permissions).
2. 给予你的玩家或者权限组 `tab.group.<组名称>` 权限。
3. 将所有服务器存在的权限组添加到 [primary-group-finding-list](https://github.com/NEZNAMY/TAB/wiki/config.yml#primary-group-finding-list) 选项。这是必须的，因为：\
   \#1 - 没有检查玩家拥有所有的权限的办法，我们只能通过检查玩家是否有我们所要的权限。\
   \#2 - 如果一个玩家拥有超过一个组的权限，那么插件只会优先读取最靠前的权限组，而不是根据我们的排序来读取最优先的权限组。

**不要忘记 OP = 所有权限!** 这是 OP 存在的意义 —— 获取所有的权限。这样的话，你需要给予你  `-tab.group.不想要的低级组名称` 或者将该权限的值设置为 false 来获得自己实际需要的组。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.superiormc.cn/tab-wiki/getting-start/fen-zu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
