# Region Quotas

The built-in Quotas feature lets you set limits for the total number of regions a player can own and their size in blocks. 
These limits apply automatically based on a player's rank or permissions.

There are two quotas available: **Regions Amount** and **Blocks per Region**.

{.compact}
| Quota | Description |
| ---   | ---         |
| Regions Amount | This limit sets the maximum number of regions a player can create. |
| Blocks per Region | This limit restricts the total number of blocks a single region can have. |

---

## :icon-phs-gear: Configuration

You can change quota settings in the [module config](/regions/configuration) file under the `Limits` section.

You can set limits using one of two operation modes:

- **Rank Mode:** Set `Mode: RANK` to assign limits based on a player's permission group. The keys in the `Values` section are the exact permission group names (e.g., `vip`, `premium`).
- **Permission Mode:** Set `Mode: PERMISSION` to assign limits based on specific player permissions. The keys in the `Values` section act as suffixes attached to the `Permission_Prefix` setting.
- **Default Values:** In either mode, if a player does not have the specified rank or permission, the `Default_Value` applies.
- **Unlimited Quotas:** Use a value of `-1` to give an unlimited amount of regions or blocks.
- **Region-Size-3D-Validation:** Whether region size caluclates in 3-dimensions instead of 2D.

**Example Configuration:**

```yaml
Limits:
  # Controls how many region claims a player can create.
  Max-Regions-Per-Player:
    Mode: RANK # Looks up player ranks.
    Permission_Prefix: regions.amount.
    Default_Value: 4
    Values:
      owner: -1 # Players with the 'owner' rank get unlimited regions.
      vip: 5
      premium: 7

  Max-Blocks-Per-Player:
    Mode: RANK
    Permission_Prefix: regions.size.
    Default_Value: 20000.0
    Values:
      owner: -1.0 # Players with the 'regions.size.owner' permission get unlimited blocks.
      vip: 50000.0
      premium: 70000.0

  Region-Size-3D-Validation: true
```
