# Protection

The protection system allows a Staff Member to protect a player or protect an entire area.

## Configuration

Inside the config file make sure this section is added:

```yaml
############################################################
# +------------------------------------------------------+ #
# |                      Protection                      | #
# +------------------------------------------------------+ #
############################################################

protect-module:
  # Whether or not the plugin will use "/protectplayer" features.
  player-enabled: true
  # Whether or not the plugin will use "/protectarea" features.
  area-enabled: true
  # The max area size that can be protected.
  area-max-size: 40
```

## Protecting a player

This is pretty simple. `/protectplayer playername` toggles protection for a player, when protected the player takes no damage at all. Protection wears off after the players logs out or if a staff member turns it off.

## Protecting an area

A Staff member can decide to quickly protect an area from non Staff Members. This can be useful when something needs to be investigated. Once protection for an area is turned on, players cannot open chests, break blocks, place blocks, press buttons, switch levers, place water/lava. In general we try to protect everything inside the area from other players. If the feature is useful we can see if other protection measures must be taken.

To protect an area type `/protectarea create 40 My new area`.

* action: create
* size: a square of 40x40
* name: My new area
* The center point of the area is where you are standing.

To delete a protected `/protectarea delete My new area`.

* action: delete
* name: My new area

### Staff Mode

In addition to the command line tool. There is also an overview of protected areas when in staff mode.

#### This can be accessed through the GUI HUB:

![](/files/-MPQwvzAhirN3LSL2BA5)

#### All areas are displayed here:

![](/files/-MPQwzdXQNmBLs6AyEsy)

#### When clicking on an item we can delete(red) the protected area or teleport(orange) to it.

![](/files/-MPQx221RlTYHUDUvFUf)


---

# Agent Instructions: 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://wiki.staffplusplus.org/features/protection.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.
