> For the complete documentation index, see [llms.txt](https://wiki.hakairo.de/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.hakairo.de/essentials/protection.md).

# Protecting Blocks & Contents

You can protect your chests, doors and other containers, which is highly advised to protect yourself from griefers and make your life and moderator lives a little easier.

## Protection Creation

### /cprivate

Create a private protection. Private means only you are able to access the protection unless you grant other users access as well. Learn how to add other users to your protection [here.](/essentials/protection.md#cmodify) \
Alternatively you can also use `/lock`.

{% hint style="info" %}
To protect many blocks at once, use `/cpersist` before entering `/lock`. This will let you perform the last action on several blocks without needing to re-type the command. `/cpersist` also works with other protection commands.
{% endhint %}

### /cpublic

Create a public protection. Anyone can use a public protection, but no one can unlock it except the owner.

### /cpassword \[password]

Password-protect a block. Every time you log in, you need to re-enter the password to access the protection. Anyone who knows the password can access the protection.

### /cdisplay

Create a display protection. Anyone can view the protection's contents but cannot modify them.

## Protection Management

### /trust add \[username]

Trusting a user enables that user to access all of your protections with only one command.

### /trust remove \[username]

Removing a user from your trust, makes the user unable to access your protections (default).

### /cmodify

Modify an existing protection. Each modification either grants access (by default), removes access (using\
`-`), or gives admin access (using `@`) on the protection. Several modifications can be made in a single command by separating each one with a space.

#### Examples:

`/cmodify Ryoyo @Evitarr` - adds Ryoyo to the protection and Evitarr as a protection admin.\
`/cmodify -Ryoyo -Evitarr` - removes access to the protection from Ryoyo and Evitarr.

### /cremove

Removes protection from a block.

### /cunlock

Unlock a password-protected block.

## Protection flags

### /lwc flag hopper \[on/off]

Controls whether or not hoppers can be used to place and take out items into a protected block. Off by default.

### /lwc flag hopperin \[on/off]

Controls whether or not hoppers can be used to place items into a protected block. Off by default.

### /lwc flag hopperout \[on/off]

Controls whether or not hoppers can be used to take items out of a protected block. Off by default.
