> For the complete documentation index, see [llms.txt](https://pdoc.originx.cc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pdoc.originx.cc/released/plugin-docs/mineduty/pei-zhi-shuo-ming/items.yml.md).

# items.yml

示例:

```
example:
  #当玩家右键时
  onRightClick:
    #玩家执行指令:xxx
    - "@runcommand||xxx"
  #若设定该值，游戏中玩家的该槽位将设定为该物品
  slot: 8
  #若设定该值，当游戏为该状态时玩家的slot槽位会设定为该物品
  #游戏状态为 WAIT(等待) INGAME(游戏中) END(游戏结束)
  state: WAIT
  #若设定该值，当玩家处于启动限定区域内时slot槽位会设定为该物品
  restricted: true
  #若设定该值，该物品会被视为特殊物品，有以下内容可选
  #爆破模式的炸弹物品(TNT) 游戏结束的烟花(ENDFIREWORK) NONE(无类型)
  type: TNT
  #物品,您可以通过/duty builder setitem <标识符>来将您游戏中手持的物品设在这里
  #例如/duty builder setitem example 
  item:
    ==: org.bukkit.inventory.ItemStack
    v: 3465
    type: SLIME_BALL
    amount: 1
    meta:
      ==: ItemMeta
      meta-type: UNSPECIFIC
      display-name: '{"extra":[{"text":"§c退出游戏"}],"text":""}'
```

以下是默认的物品配置文件

<pre><code><strong>WAIT_LEAVEGAME:
</strong>  onRightClick:
    - "@runcommand||duty leave"
  slot: 8
  state: WAIT
  item:
    ==: org.bukkit.inventory.ItemStack
    v: 3465
    type: SLIME_BALL
    amount: 1
    meta:
      ==: ItemMeta
      meta-type: UNSPECIFIC
      display-name: '{"extra":[{"text":"§c退出游戏"}],"text":""}'
INGAME_GUNSHOP:
  onRightClick:
    - "@runcommand||open gunshop"
  slot: 6
  restricted: true
  state: INGAME
  item:
    ==: org.bukkit.inventory.ItemStack
    v: 3465
    type: SLIME_BALL
    amount: 1
    meta:
      ==: ItemMeta
      meta-type: UNSPECIFIC
      display-name: '{"extra":[{"text":"§c枪械商店"}],"text":""}'
END_FIREWORK:
  type: ENDFIREWORK
  item:
    ==: org.bukkit.inventory.ItemStack
    v: 3465
    type: SLIME_BALL
    amount: 1
    meta:
      ==: ItemMeta
      meta-type: UNSPECIFIC
      display-name: '{"extra":[{"text":"§c烟花"}],"text":""}'
TNT:
  type: TNT
  slot: 4
  state: INGAME
  item:
    ==: org.bukkit.inventory.ItemStack
    v: 3465
    type: TNT
    amount: 1
    meta:
      ==: ItemMeta
      meta-type: UNSPECIFIC
      display-name: '{"extra":[{"text":"§c炸药"}],"text":""}'
</code></pre>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://pdoc.originx.cc/released/plugin-docs/mineduty/pei-zhi-shuo-ming/items.yml.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.
