# 商店界面模板

配置文件位于 **Templates** 文件夹下

每个模板的配置节点如下

<details>

<summary>Default.yml</summary>

```
title: '%shop%'
size: 54
#商品出现的位置  & The slot where the product appears
#这里设置了多少位置，则该商店每日刷新多少商品 & How many slot are set here, how many products are refreshed by the store every day
layout: [11,13,15,29,31,33]
#当该商品位没被随机到商品时展示的物品 & Items displayed when the item is not randomly assigned to the item
empty:
  display: '&f[ &e无商品 &f]'
  material: BARRIER
  data: 0
  amount: 1
  model: 0
  lore:
    - ''
    - '&f该位置每有随机到商品'
    - '&f你的运气似乎不是很好...'
#商品的lore模板 %lore%为商品的原lore & The lore template% lore% of the product is the original lore of the product
items_lore:
  - '&7商品品质: &e%rarity%'
  - '%lore%'
  - ''
  - '%placeholder_sellOrBuy%'
  - '&e价格: &a%price%%currency%/个'
  - ''
  - '&a左键 &b购买/出售 &d1 &b个'
  - '&a右键 &b购买/出售 &d32 &b个'
  - '&aShift+左键/出售 &b自定义数量'
  - '&aShift+右键 &b出售 &d所有 &b个'
  - ''
  - '%placeholder_limit%'
  - '%placeholder_limit_self%'
#当你将随机池内某个物品删除但该玩家今日商店内还有该商品时展示的物品
# The item displayed when you delete an item from the random pool but the player still has the item in the store today
unknown:
  display: '&c商品已被下架'
  material: REDSTONE
  data: 0
  amount: 1
  lore:
    - ''
    - '&c该商品已被下架...'
    - ''
# 变量 & variable
placeholder:
  buy: '&e商品类型: &a购买'
  sell: '&e商品类型: &a出售'
  limit: '&e限量: &a%buy%/%max%'
  limit-self: '&c在全服限购的基础下你能购买 &e%buy%/%max% &c次'
  #当玩家有折扣时的价格变量%price%变为如下
  #%oldprice%为原价 %discount%为打折后的价格
  discount: '&a&m%oldprice%%discount%'
customItems:
  refresh:
    display: '&f[ &a点击刷新 &f]'
    amount: 1
    material: APPLE
    data: 0
    model: 0
    lore:
      - ''
      - '&f点击刷新 &e当前 &f商店.'
      - '&f你还有 &a%amount% &f点刷新次数.'
    slot: [49]
    fuction:
      # refresh 刷新按钮 &  Click to refresh the shop's products
      # null: 点击后不发生任何事情，属于装饰品 &  Nothing happens after clicking, it belongs to decoration
      # close: 点击后关闭GUI & Click to close GUI
      type: refresh
```

</details>

***

{% hint style="info" %}
默认模板图片

![](https://351497656-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FrdwC7k9AL72nqqv0qU93%2Fuploads%2FQYZqIHH6Y3C3xF2vDtHj%2F%E8%81%94%E6%83%B3%E6%88%AA%E5%9B%BE_20240221160321.png?alt=media\&token=25fcf78d-998e-4f56-921e-4cc96c5c39a4)
{% endhint %}

## 创建新的界面模板并运用到指定商店

1. 在 **Templates** 文件夹下新建一个yml文件 （文件名即为该模板的ID）
2. 复制 **Default.yml** 并修改成你需要的排版
3. 打开需要应用的商店配置文件
4. 加入 `template: 模板ID`
5. 重载插件


---

# 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://gyzer.gitbook.io/legendarydailyshop/cha-jian-pei-zhi/shang-dian-jie-mian-mu-ban.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.
