# 小提示

## 在 TAB 列表中显示死亡数

```
yellow-number-in-tablist: 
  enabled: true
  value: "%statistic_deaths%"
```

请保证你的服务器安装了 [PlaceholderAPI](https://www.spigotmc.org/resources/6245/) 和它的 statistic 拓展 (`/papi ecloud download statistic`)。\
**注意:** 这是从服务器的数据统计值处获得的，您可以在 `<默认世界名称>/stats/<玩家 uuid>.json` 重置其数据。

## 使用来自权限组插件的前缀和后缀

删除 **groups.yml** 中所有的组并只保留:

```
_DEFAULT_:
  tabprefix: "%vault-prefix%"
  tagprefix: "%vault-prefix%"    
  tabsuffix: "%vault-suffix%"    
  tagsuffix: "%vault-suffix%"
```

你需要 Vault 和一个权限组插件挂钩。\
如果你安装了 LuckPerms，你也可以使用 `%luckperms-prefix%` 作为前缀（suffix，后缀也是同理）。\
**注意:** 如果你在 BC 上安装了 TAB 并且希望显示子符的前缀，请使用 `%vault_prefix%` (或者 `%luckperms_prefix%`) 并参考 [BungeeCord上的变量符](/tab-wiki/functions/bungeecord-shang-de-bian-liang-fu.md)。&#x20;

## 在 TAB 列表中显示玩家的版本号

使用指令 `/tab group _DEFAULT_ tabsuffix " &8[&3%player-version%&8]"` ，如果你希望显示的版本号统一在右侧，请使用 [TAB 后缀对齐功能](/tab-wiki/core-features/tab-hou-zhui-dui-qi.md)。&#x20;

## 复制 Purpur 的 TPSBar

默认情况下，Purpur 的 TPS 条显示服务器的 TPS, MSPT和玩家的延迟，并且它们将会根据值来改变颜色，从绿色到红色。较为简单的一个办法是使用 [变量符输出替换](/tab-wiki/functions/bian-liang-fu-shu-chu-ti-huan.md) 功能，然而，它会替换 TAB 中所有用到该变量符的地方，这会导致当你在[ 黄色数字](/tab-wiki/core-features/huang-se-shu-zi.md) 功能使用像 %ping% 的变量符是，它将不再工作，因为这时的该变量符将因为你的替换而拥有颜色代码。因为如此，我们将会使用 [条件变量符](/tab-wiki/functions/tiao-jian-bian-liang-fu.md) 功能。&#x20;

当 TPS 超过 19 时，它将会显示 `<#55FF55>值value</#00AA00>`。当超过 15 时，它将会显示 `<#FFFF55>值</#FFAA00>`，否则将会显示`<#FF5555>值</#AA0000>`。这可以通过 2 个条件来实现:

```
conditions:
  tps:
    conditions:
      - "%tps%>=19"
    yes: "<#55FF55>%tps%</#00AA00>"
    no: "%condition:tps2%"
  tps2:
    conditions:
      - "%tps%>=15"
    yes: "<#FFFF55>%tps%</#FFAA00>"
    no: "<#FF5555>%tps%</#AA0000>"
```

要使用这个条件变量符，我们需要使用 `%condition:tps%` 变量符。\
现在，重复 mspt 和 ping（玩家延迟）变量符的操作。对于 mspt，Purpur的间隔是 <40, <50, 50+。对于玩家延迟，则是 <100, <200, 200+。

mspt 和玩家延迟的条件应该像这样:

```
conditions:
  mspt:
    conditions:
      - "%mspt%<40"
    yes: "<#55FF55>%mspt%</#00AA00>"
    no: "%condition:mspt2%"
  mspt2:
    conditions:
      - "%mspt%<50"
    yes: "<#FFFF55>%mspt%</#FFAA00>"
    no: "<#FF5555>%mspt%</#AA0000>"
  ping:
    conditions:
      - "%ping%<100"
    yes: "<#55FF55>%ping%</#00AA00>"
    no: "%condition:ping2%"
  ping2:
    conditions:
      - "%ping%<200"
    yes: "<#FFFF55>%ping%</#FFAA00>"
    no: "<#FF5555>%ping%</#AA0000>"
```

要使用它们，我们可以使用 `%condition:mspt%` 和 `%condition:ping` 变量符。Purpur 的 TPS条是使用 mspt 作为从 0 到 50 数值的 Boss条。这可以通过 PlaceholderAPI 的 math 拓展实现: `%math_0_{tab_placeholder_mspt}*2%`。它将会使用 `GREEN` 颜色和 `NOTCHED_20` 风格，让我们汇总这些到 bossbar.yml 文件:

```
  bars:
    tpsbar:
      style: NOTCHED_20
      color: GREEN
      progress: "%math_0_{tab_placeholder_mspt}*2%"
      text: "&7TPS&e: %condition:tps% &7MSPT&e: %condition:mspt% &7Ping&e: %condition:ping%&7ms"
```

最后一步就是配置这个 Boss条 在何时显示。一种方法是使用 Boss条 的公告/发送指令。另一种方式则是使用显示条件，例如 `display-condition: "%permission:tab.tpsbar%` 。这样拥有 tab.tpsbar 权限的玩家将会看到该 Boss条。

## BedWars1058 兼容

### 分组

要想通过 TAB 分组，请添加 PLACEHOLDER\_A\_TO\_Z 分组模式并使用 %bw1058\_player\_team% 变量符，示例:

```
sorting-types:
  - "PLACEHOLDER_A_TO_Z:%bw1058_player_team%"
  - "GROUPS:admin,mod,default"
  - "PLACEHOLDER_A_TO_Z:%player%"
```

### TAB 列表和名称并且显示玩家所在的游戏队伍

要显示玩家所在的游戏队伍，请使用该指令: `/tab group _DEFAULT_ tabprefix %bw1058_player_team%`\
名称标签也是同理，只需把 tagprefix 替换成 nametag 即可: `/tab group _DEFAULT_ nametag %bw1058_player_team%`

如果你只想显示玩家队伍的缩写，请安装 PlaceholderAPI 的一个拓展: <https://api.extendedclip.com/expansions/bw1058plus/> 并使用 `%bw1058plus_team_letter%` 变量符，如果你还想要显示玩家队伍的颜色，在这个变量符的右侧再补上 `%bw1058plus_team_color%` 变量符即可。

### 大厅 Rank 和游戏里的玩家队伍

如果你想在玩家还在游戏大厅时显示它的 Rank，而在游戏房间中显示他所在的游戏队伍，不用担心，这里有一个办法 =)\
你可以通过条件来检查玩家当前的队伍，如果当前队伍为空（这意味着玩家目前还没有开始游戏），那么就返回 Rank 或者它们所选择的队伍。示例：

```
conditions:
  rankOrTeam:
    conditions:
      - "%bw1058_player_team%="
    yes: "%luckperms-prefix%"
    no: "%bw1058_player_team%"
```

然后输入 `/tab group _DEFAULT_ tabprefix %condition:rankOrTeam%` 和 `/tab group _DEFAULT_ tagprefix %condition:rankOrTeam%` 这样你设置的条件将会作用到你的 TAB 列表和名称标签了。


---

# 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/other-guie/xiao-ti-shi.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.
