# nameplate.yml

**预览持续时间:**

* `preview-duration` 决定了铭牌预览显示给玩家的时间（以秒为单位）。在此配置中，它设置为 5 秒。

```yaml
preview-duration: 5
```

**默认铭牌:**

* `default-nameplate` 定义当玩家的姓名牌设置为`'none'`时将显示的姓名牌。在本例中，它被设置为“无”，意味着默认情况下不会显示任何特定的姓名牌。

```yaml
default-nameplate: 'none'
```

**始终显示铭牌:**

* `always-show` 选项控制铭牌是否始终对玩家可见，无论其当前状态如何。将其设置为 `false` 意味着铭牌不会始终可见。

```yaml
always-show: false
```

**铭牌配置:**

* **前缀:** `prefix`指定在玩家名字前显示的字符串。这里，`%np_switch_nameplate_color_prefix%` 用作颜色的占位符。
* **玩家名称:** `player-name` 定义玩家名称的显示方式。此处使用占位符 `%np_shift_player_name%` 来确保玩家名称不受客户端`强制使用Unicode字体`设置的影响。
* **后缀:** `suffix`在玩家名字后面添加一个字符串，这里设置为`%np_switch_nameplate_color_suffix%`来关闭颜色标签

```yaml
nameplate:
  prefix: '%np_switch_nameplate_color_prefix%'
  player-name: '%np_shift_player_name%'
  suffix: '%np_switch_nameplate_color_suffix%'
```

**无限标签:**

`unlimited` 部分定义了可与玩家铭牌一起显示的自定义标签。每个标签都有特定的行为和外观设置:

* **标签 1:**
  * **文本:** 要显示的文本，这里使用占位符`%np_tag-image%`。
  * **平移:** `translation` 字段将标签相对于玩家的铭牌移动，以 `0,0.2,0` 作为偏移量（X, Y, Z）。
  * **查看者和所有者条件:** 这些条件决定了谁可以在什么情况下看到标签。对于 tag\_1，所有者必须:
    * 有铭牌 （`has-nameplate: true`），
    * 受到 `INVISIBILITY<0` 药水效果的影响，
    * 没有伪装（self-disguised: false）\[需要 LibsDisguise]。
  * **其他属性:** 该标签受蹲起、玩家的尺寸属性和旁观者模式的影响。它的`line-width`为 1024，背景透明（`0,0,0,0`）。
* **标签 2:** 与tag\_1类似，但在平移上略有调整（`0.01,0.2,0.01`）。
* **标签 3:** 此标签与其他标签不同，它仅在玩家没有铭牌 (`has-nameplate: false`) 时显示。它还具有不同的背景颜色 (`64,0,0,0`)，使其具有部分不透明的黑色背景。

```yaml
unlimited:
  tag_1:
    text: '%np_tag-image%'
    translation: 0,0.2,0
    viewer-conditions: { }
    owner-conditions:
      has-nameplate: true
      potion-effect: "INVISIBILITY<0"
      self-disguised: false
    affected-by-crouching: true
    affected-by-scale-attribute: true
    affected-by-spectator: true
    line-width: 1024
    background-color: 0,0,0,0
  tag_2:
    text: '%np_tag-text%'
    translation: 0.01,0.2,0.01
    viewer-conditions: { }
    owner-conditions:
      has-nameplate: true
      potion-effect: "INVISIBILITY<0"
      self-disguised: false
    affected-by-crouching: true
    affected-by-scale-attribute: true
    affected-by-spectator: true
    line-width: 1024
    background-color: 0,0,0,0
  tag_3:
    text: '%np_tag-text%'
    translation: 0,0.2,0
    viewer-conditions: { }
    owner-conditions:
      has-nameplate: false
      potion-effect: "INVISIBILITY<0"
      self-disguised: false
    affected-by-crouching: true
    affected-by-scale-attribute: true
    affected-by-spectator: true
    line-width: 1024
    background-color: 64,0,0,0
    
    # 其他属性
    shadow-strength: 1.0
    shadow-radius: 0.0
    is-see-through: false
    opacity: -1
    use-default-background-color: false
    alignment: CENTER
    scale: 1,1,1
    view-range: 1.0
```
