> 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
