> For the complete documentation index, see [llms.txt](https://squareplugins.gitbook.io/megaverse/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://squareplugins.gitbook.io/megaverse/plugin-usage/world-flags.md).

# World Flags

Flags are used to block, allow, or customize certain features of a world, such as displaying a message on entry, disabling portals, disabling PvP, and similar functionalities.&#x20;

On this page, you can learn more about Flags and how they work.

***

## Setting flags for a world

The main command to set-up flags is:

```
/megaverse flag
```

***

## List of available flags

### pvp

> Allows you to enable or disable PvP (Player vs. Player) damage for this world.
>
> **Default**: `true`
>
> **Bypass permission**:&#x20;
>
> ```
> megaverse.bypass.flag.pvp
> ```

### allow-weather-changes

> With this flag, you can disable any weather change for this world.
>
> **Default**: `true`

### keep-spawn-in-memory

> Allows you to set whether the server should keep spawn chunks in memory. It is recommended to leave this option as `false` for better performance.
>
> **Default**: `false`

### portal-formation

> Allows you to block any type of portal formation. For example, with this flag you can prevent players from creating Nether Portals.
>
> **Default**: `true`

### server-join-message

> Allows you to change the server join message in this world.
>
> You can use `%player%` in order to show the joining player's name.

### allow-flying

> With this flag, you can block any players trying to fly.

### force-flying-status

> Allows you to force any player entering the world to start flying instantly.
>
> **Default**: `true`

### allow-hunger

> With this flag, you can disable player hunger in a specific world.
>
> **Default**: `true`

### sound-on-enter

> With this flag, you can play a sound for any player entering a specific world.
>
> **Default**:&#x20;
>
> ```parser
> entity.experience_orb.pickup
> ```

### sound-on-leave

> With this flag, you can play a sound for any player leaving a specific world.

### fullheal-on-enter

> With this flag, any player who enters a specific world will automatically be fully healed.
>
> **Default**: `false`

### allow-elytras

> With this flag, you can block and/or allow elytras in a specific world.
>
> **Default**: `true`

### gamemode

> Change the player's gamemode when they enter the world.
>
> You can use 0 for survival, 1 for creative, 2 for adventure, 3 for spectator.

### title-on-enter

> Allows you to display a title on the screen of all players entering the world.
>
> You can show subtitles by including `\n` in the middle of your message. For example:&#x20;
>
> ```
> Title\nSubtitle
> ```

### message-on-enter

> Allows you to send a message to all players entering the world.


---

# 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://squareplugins.gitbook.io/megaverse/plugin-usage/world-flags.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.
