# 事件

## 示例

```yaml
#
# 菜单的事件处理
#
Events:
  # 开启菜单
  Open:
    - condition: 'perm *trmenu.use'
      actions:
        - 'sound: BLOCK_CHEST_OPEN-1-0'
      deny:
        - 'sound: ENTITY_ITEM_BREAK-1-0'
        - 'title: `&c&lPermission Required` `&7&lYou need permission &6&ltrmenu.use &7&lto open this menu` 15 20 15'
        - 'return'
  # 关闭菜单
  Close:
    - 'sound: BLOCK_CHEST_CLOSE-1-0'

```

## 注意

* 事件配置的对象均是反应（动作组）
* 若执行 RETURN 动作，则事件将取消


---

# 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://hhhhhy.gitbook.io/trmenu-v3/menu/configuration/event.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.
