> For the complete documentation index, see [llms.txt](https://wiki.mypet-plugin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.mypet-plugin.com/setup-guide/getting-started/plugin-hooks/wg-region-flags.md).

# WG Region Flags

Custom flags for use with WorldGuard regions.

MyPet hooks into WorldGuard to provide custom region flags. The WorldGuard hook must be enabled in hooks-config.yml for the flags to work.

Available flags:

* `mypet-fly`
  * Prevents flying with a pet in the region.
* `mypet-damage`
  * Checks whether the MyPet owner can attack a target player or entity following the rules of the WorldGuard region. If the owner of a pet can cause damage, the MyPet can too.
* `mypet-deny`
  * When enabled, denies the use of pets in a region. Pets will be sent away when entering and cannot be called.

## Releasing pets in protected regions

Since 4.0.1, **releasing** a pet (`/petrelease` or the Release button) is refused in regions that don't permit that mob type to spawn — a released pet becomes a genuine wild mob, so WorldGuard's own `mob-spawning` and `deny-spawn` flags apply to it, per mob type. The same works with any other protection plugin that cancels mob spawns. A refused release leaves the pet completely unharmed.

**Calling a pet is not affected** — pets are exempt from region mob-spawning rules everywhere. Use `mypet-deny` to keep pets out of a region entirely.


---

# 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, and the optional `goal` query parameter:

```
GET https://wiki.mypet-plugin.com/setup-guide/getting-started/plugin-hooks/wg-region-flags.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
