# Residence

## What Is a Residence?

Residences are areas you claim where you control what happens:

* Prevent griefing (no breaking or using your stuff)
* Let friends build, open containers, or teleport in
* Set custom rules with **flags**

Players can also **teleport** to their residences—no more getting lost!

## Residence Limits by Rank

The size of each player's residence is calculated based on their rank. To find out how large your residence can be and how many you can have, use the command\
`/res limits`

|  Rank  | Max Number | Max Size |
| :----: | :--------: | :------: |
| PLAYER |      2     |  200x200 |
|  ULTRA |      4     |  350x350 |
|  HERO  |      6     |  500x500 |
| LEGEND |      8     |  600x600 |

## How to Create a Residence

#### Using a Wooden Hoe

1. Hold a **wooden hoe**
2. **Left-click** a block to set the first corner
3. **Right-click** another block to set the opposite corner
4. Run `/res select vert` to include the entire height
5. Run `/res create <residence_name>`

***

#### Quick Method

1. Stand at the **center** of the area
2. Run: `/hres <residence_name>`

This will create a residence evenly in all directions around you.

***

#### Using a Command

1. Stand where you want the residence center
2. Run: `/res select <x> <y> <z>`\
   \&#xNAN;*(e.g., `/res select 4 4 4` creates a 9x9x9 cube around you)*
3. (Optional) Run `/res select vert` for full vertical space
4. Finish with: `/res create <residence_name>`

## Teleporting

* Set your teleport point: `/res tpset`
* Teleport anytime: `/res tp <residence_name>`

## Granting or Removing Permissions

Give basic access (build, destroy, use, etc.):

* **Allow:** `/res padd <residence_name> <player>`
* **Deny:** `/res pdel <residence_name> <player>`

## Flags – Custom Rules

Flags control what is or isn't allowed in your residence.

#### Setting Flags

* For the entire residence:\
  `/res set <residence> <flag> <true/false>`\
  Example: `/res set piston true`
* For a specific player:\
  `/res pset <residence> <player> <flag> <true/false>`\
  Example: `/res pset myhouse Steve build true`

#### Common Flags

| Flag        | Description                      |
| ----------- | -------------------------------- |
| `move`      | Allow walking through the area   |
| `build`     | Place blocks                     |
| `destroy`   | Break blocks                     |
| `use`       | Use buttons, doors, levers, etc. |
| `container` | Open chests, furnaces, etc.      |
| `ignite`    | Light fires                      |
| `flow`      | Let water/lava flow              |
| `piston`    | Allow piston movement            |
| `healing`   | Enable healing in the residence  |
| `animals`   | Allow animal spawning            |
| `monsters`  | Allow monster spawning           |

## Subzones

Subzones are "residences within residences"—great for towns or selling plots.

#### Creating a Subzone

1. Select the area (like a normal residence)
2. Must be **inside** an existing residence
3. Use: `/res subzone <subzone_name>`

*Subzone names are formatted like:*\
`MainResidence.SubzoneName`\
Example: `City.Tesco`

***

#### Setting Subzone Flags

* For all players:\
  `/res set City.Tesco piston false`
* For a specific player:\
  `/res pset City.Tesco Steve container false`

## Deleting a Residence or Subzone

**WARNING: This cannot be undone!**

* Delete: `/res remove <name>`
* Confirm: `/res confirm`

*Example:*\
`/res remove City.Tesco` → `/res confirm`

## Useful Info Commands

| Command                 | What it does                                                                                   |
| ----------------------- | ---------------------------------------------------------------------------------------------- |
| `/res info <name>`      | Shows info about the residence                                                                 |
| `/res list`             | Lists your residences                                                                          |
| `/res list <player>`    | Lists another player’s residences                                                              |
| `/res sublist <player>` | Lists a player’s subzones                                                                      |
| `/res expand <number>`  | Expands the residence selection by the given number of blocks in the direction you are looking |
