# UI 配置

你可以在 `/plugins/SpinToWin/ui` 找到所有的UI配置。插件中用到的 uiName 参数就是文件的名称，例如 `ui.yml` 文件的 \<uiName> 参数就是 `example`。

**免费版只能加载 1 个UI，购买付费版以无视此限制。**

<figure><img src="/files/X2aaRsmX023Auouykgbn" alt=""><figcaption></figcaption></figure>

下面是一个示例文件：

```
gui: ":offset_-8::s2w_ui:"
inventory_size: 45
history_gui: ""
history_inventory_size_dynamic: true
slots: [9,10,11,12,13,22,31,40,39,38,37,36,27,18]
reserve: false
replace:
  material: gray_stained_glass_pane
  amount: 1
  display: "&3Acquired"
frame: frame
show_rate: true
auto_reset_when_empty: true
auto_close_when_empty: true
auto_close_when_price_not_meet: false
limits:
  default: 100
  vip: 200
limits-conditions:
  vip:
    - 'permission: group.vip'
buttons:
  spin:
    icons: [spin_1,spin_2,spin_3]
    slots: [33,34,35]
    display: "&aSpin!"
    lore:
      - "&fYou should cost %price%"
      - "&f"
      - "%click%"
  history:
    icons: [history_1,history_2,history_3]
    slots: [42,43,44]
    display: "History"
    lore:
      - "&fCheck the rewards you have drawn."
last_reward:
  material: DIAMOND_SWORD
  amount: 1
last_reward_slot: 16
rewards:
  1:
    material: DIAMOND
    cmd: 0
    display: '&eA赏'
    lore:
      - '&fLine1'
      - '&fLine2'
    commands:
      - 'help'
  2:
    material: IRON_INGOT
    amount: 10
    chance: 20
  3:
    material: GOLD_INGOT
    amount: 5
    chance: 10
  4:
    material: APPLE
    amount: 64
    chance: 10
  5:
    material: DIAMOND
    amount: 2
    chance: 5
  6:
    material: IRON_INGOT
    amount: 10
    chance: 20
  7:
    material: GOLD_INGOT
    amount: 5
    chance: 10
  8:
    material: APPLE
    amount: 64
    chance: 10
  9:
    material: DIAMOND
    amount: 2
    chance: 5
  10:
    material: IRON_INGOT
    amount: 10
    chance: 20
  11:
    material: GOLD_INGOT
    amount: 5
    chance: 10
  12:
    material: APPLE
    amount: 64
    chance: 10
  13:
    material: DIAMOND
    amount: 2
    chance: 5
  14:
    material: IRON_INGOT
    amount: 10
    chance: 20
prices:
  1:
    hook-plugin: EcoItems
    hook-item: test
    amount: 15
    placeholder: 'test x15'
  2:
    material: STONE
    amount: 10
    placeholder: 'STONE x10'
  3:
    economy-plugin: Vault
    amount: 10.0
    placeholder: '$10'
  4:
    vanilla-type: levels
    amount: 5
    placeholder: '5 L'
  5:
    economy-type: levels
    amount: 5
    placeholder: '5 L'
  6:
    economy-type: levels
    amount: 5
    placeholder: '5 L'
  7:
    economy-type: levels
    amount: 5
    placeholder: '5 L'
  8:
    economy-type: levels
    amount: 5
    placeholder: '5 L'
  9:
    economy-type: levels
    amount: 5
    placeholder: '5 L'
  10:
    economy-type: levels
    amount: 5
    placeholder: '5 L'
  11:
    economy-type: levels
    amount: 5
    placeholder: '5 L'
  12:
    economy-type: levels
    amount: 5
    placeholder: '5 L'
  13:
    economy-type: levels
    amount: 5
    placeholder: '5 L'
  14:
    economy-type: levels
    amount: 5
    placeholder: '5 L'
```

* gui: 转盘UI的标题。
* inventory\_size: 转盘UI的大小，必须是 `9, 18, 27, 36, 45, 54` 其中之一数字。
* history\_gui: 历史奖励UI的标题。
* history\_inventory\_size\_dynamic: 历史奖励UI的标题是否会跟随已领取奖励数量动态变化，例如 9 个奖励就一行大小，17个奖励就两行大小，如果是否，那么历史奖励UI的大小会和 `inventory_size` 一样。
* slots: 奖励物品所在格数。**不能在第一行！**
* reserve: 奖励抽中以后是继续保留还是这次不再能获取到了。
* auto\_reset\_when\_empty: 当所有奖励全部抽完以后是否重置奖励。
* auto\_close\_when\_empty: 当所有奖励全部抽完以后是否自动关闭UI。
* auto\_close\_when\_price\_not\_meet: 当玩家不能满足下次抽奖的价格时，是否自动关闭UI。
* replace: 玩家已抽到奖励且上面 reserve 选项开启情况下，该奖励对应位置替换的物品。
* frame: 外壳名称，见 `config.yml`。
* show\_rate: 是否在每个奖励物品下面添加一行，显示物品抽中几率。
* limits: 设置该UI最多抽奖次数。**你必须开启 config.yml 文件中的 check-permission-limit 选项才能使用这个功能。**
* limits.default: 如果玩家不能满足所有的条件，就会使用这个值作为抽奖次数上限。
* limits.<条件id>: 满足这个条件的玩家就会使用该选项的值作为抽奖次数上限。

```
limits:
  default: 10
  vip: 20
limits-conditions:
  vip: 
    - 'permission: test.permission'
```

条件id在 limits-conditions 选项中设置，格式如上。在这个示例中，满足 test.permission 权限节点的玩家将会有 20 次抽奖机会。

* button:  按钮物品。
* button.icons: 按钮名称，见 `config.yml`。
* last\_reward: 当所有奖励全部抽中以后，将会获得该奖励，如果不需要这个功能，可以删掉这个选项。
* last\_reward\_slot: 最终奖励的格子。
* rewards: 奖励配置。
* prices: 价格配置。


---

# 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://spintowin.superiormc.cn/jian-ti-zhong-wen-2/configs/ui-pei-zhi.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.
