> 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/systems/world-groups.md).

# World Groups

To allow server owners to manage the worlds where players have the same pet, MyPet uses World-groups to combine different worlds together (or split them up). These groups are managed in the `worldgroups.yml` file.

Changes made to the `worldgroups.yml` file will require a complete server restart. The reload command will not enforce these changes.

### How does it work?

Every world is in a *World-group* and every player can have one active pet per *World-group*, so players can have multiple sets of pets on one server. The pet will switch automatically when the player changes the world and enters another *World-group*.

### How can I disable pets in certain worlds?

There are two methods you could use to disable pets in specific worlds:

* The simplest method is to include worlds under a `Disabled:` key in `worldgroups.yml`, as shown [below](#disable-worlds).
* You can also put the world(s) into a new world-group (you can call the group whatever you want, for example `nopets`). Then remove (or don't add) the leash [permissions](https://wiki.mypet-plugin.com/setup/permissions) from these worlds. Now no new pets can be created and no pets can enter this world.

### Installation

The plugin will create the default `worldgroups.yml` configuration file and add every available world to the `default` *World-group*.

### Configuration

Every world has to be in a *World-group*. You can create as many *World-groups* as you want as long as every world is in just **one** *World-group*.

Example configuration: With this configuration every player can have one pet in the normal worlds and one in the nether worlds.

{% code title="worldgroups.yml" %}

```yaml
Groups:
  default:
  - normal
  - 2ndWorld
  nether:
  - normal_nether
  - 2ndWorld_nether
Disabled:
- example_world
```

{% endcode %}

### Disable Worlds

You can specify worlds where MyPet will not be active. Using the `Disabled:` key in `worldgroups.yml` you can list any worlds that should be disabled. These worlds should not also be included in any other world-group.

Example:

{% code title="worldgroups.yml" %}

```yaml
Disabled:
- example_world
```

{% endcode %}


---

# 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/systems/world-groups.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.
