# Permissions

**Version:** 2.0.0 (not released yet)

Claims uses the `ks.claims.*` scheme. Player nodes are allowed by default and only need to be set to take something away. Admin nodes and quota tiers are not granted by default.

What a player may do **inside a claim** is not a permission. It comes from their role and the claim's rights table, see [Rights and Roles](./rights-and-roles).

The nodes of older Claims versions (`ks.claim.user.use`, `ks.claim.admin`, `ksclaim.admin`) are no longer checked.

---

## Player nodes

Player nodes are allowed by default. Each `/ksclaim` command checks its own node. A node set to `false` takes the command away; the player gets `You do not have permission for this.` The claims window checks the same nodes for its buttons.

| Permission | Command | In the claims window |
|------------|---------|----------------------|
| `ks.claims.user.open` | `/ksclaim` (opens the window) | Opening the window, also from showcase NPCs |
| `ks.claims.user.claim` | `/ksclaim claim` | **Claim** on the map |
| `ks.claims.user.unclaim` | `/ksclaim unclaim` | **Release** on the map |
| `ks.claims.user.info` | `/ksclaim info` | – |
| `ks.claims.user.list` | `/ksclaim list` | – |
| `ks.claims.user.rename` | `/ksclaim rename` | Saving the name and the greeting |
| `ks.claims.user.home` | `/ksclaim home` | **Travel home**, **Travel** |
| `ks.claims.user.sethome` | `/ksclaim sethome` | **Set home here**, **Set here**, **Remove** (home) |
| `ks.claims.user.trust` | `/ksclaim trust` | **Add**, switching a role, the checkboxes of the rights table |
| `ks.claims.user.untrust` | `/ksclaim untrust` | **×** next to a person |
| `ks.claims.user.ban` | `/ksclaim ban` | **Ban** |
| `ks.claims.user.unban` | `/ksclaim unban` | **Lift** |
| `ks.claims.user.transfer` | `/ksclaim transfer` | **Hand over** |
| `ks.claims.user.accept` | `/ksclaim accept` | – |
| `ks.claims.user.delete` | `/ksclaim delete` | **Dissolve**, **Dissolve claim** |
| `ks.claims.user.buychunks` | `/ksclaim buychunks` | – |
| `ks.claims.user.border` | `/ksclaim border` | – |
| `ks.claims.user.help` | `/ksclaim help` | – |

Window actions without a node of their own: **Show border**, the claim settings switches, zones (create, rename, delete, rules), **Leave**, and the log. The role and the rights table of the claim decide those.

A player node never gives more than the role allows. For example, `ks.claims.user.trust` lets a player use `/ksclaim trust`, but only in claims where they may manage people.

---

## Admin nodes

Admin nodes are not granted by default.

| Permission | What it unlocks |
|------------|-----------------|
| `ks.claims.admin` | `/ksclaimadmin` and every subcommand, the admin window, the Claims tile in the `/ksadmin` hub. The admin window closes as soon as the node is gone |
| `ks.claims.admin.bypass` | Ignores the protection of every claim and server zone, always. Not needed for `/ksclaimadmin bypass` |

- `ks.claims.admin` alone does **not** ignore the protection. An admin without the bypass is a visitor in other players' claims like everyone else.
- `/ksclaimadmin bypass` (needs `ks.claims.admin`) switches a bypass that lasts until the admin logs out.
- No bypass changes the rules for fights between players.
- The `/ksadmin` hub of KyuubiSoft Core needs Core's own node as well. See [Core permissions](https://wiki.kyuubisoft.com/hytale/core/permissions/).

---

## Quota tiers

Quota tiers are not granted by default. These nodes change the quota of a player. The highest granted value replaces the value from the config.

| Permission | Effect |
|------------|--------|
| `ks.claims.chunks.<n>` | The start quota becomes `<n>` chunks instead of `quota.startChunks` |
| `ks.claims.chunks.unlimited` | No chunk limit |
| `ks.claims.claims.<n>` | The player may have `<n>` claims instead of `quota.maxClaims` |
| `ks.claims.claims.unlimited` | No limit on the number of claims |

- Only the values listed in the config are tested: `quota.chunkTiers` (`25, 50, 100, 200, 500, 1000`) and `quota.claimTiers` (`1, 2, 3, 5, 10, 20`). To use `ks.claims.chunks.75`, add `75` to `quota.chunkTiers`.
- A tier replaces the config value, so it can also be lower. `ks.claims.claims.1` limits a player to one claim even when `quota.maxClaims` is 5.
- A chunk tier above `quota.maxChunks` also lifts the maximum for that player. Growth with play time, bought chunks and the admin's bonus come on top, see [Configuration](./configuration#quota).
- Tiers are only known while the player is online. `/ksclaimadmin quota` says so for offline players.

---

## Examples

Staff with the admin window and commands:

```
group.staff.permission.ks.claims.admin: true
```

Senior staff who always ignore claims:

```
group.senior.permission.ks.claims.admin: true
group.senior.permission.ks.claims.admin.bypass: true
```

A supporter rank with 100 chunks and 10 claims:

```
group.supporter.permission.ks.claims.chunks.100: true
group.supporter.permission.ks.claims.claims.10: true
```

Guests may look but not claim:

```
group.guest.permission.ks.claims.user.claim: false
group.guest.permission.ks.claims.user.buychunks: false
```