# Events

{% hint style="info" %}
CakeProtect ใช้ WorldGuard flags เป็นหลัก ไม่มี custom Bukkit events ในเวอร์ชันนี้ แต่สามารถ listen WorldGuard events ได้
{% endhint %}

## WorldGuard Integration

CakeProtect สร้าง WorldGuard region ชื่อ `cake_ps_<id>` สำหรับทุก protection stone

คุณสามารถใช้ WorldGuard API เพื่อ:

* Query region flags
* Listen to region enter/leave events
* Add custom flags

## Planned Events (Future)

* `ProtectionCreateEvent` — เมื่อสร้าง region ใหม่
* `ProtectionDeleteEvent` — เมื่อลบ region
* `ProtectionMemberAddEvent` — เมื่อเพิ่มสมาชิก
* `ProtectionFlagChangeEvent` — เมื่อเปลี่ยน flag


---

# 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://docs.niendsitekungz.com/developer/events.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.
