> ## Documentation Index
> Fetch the complete documentation index at: https://perplayerkit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Feature Flags — Customize PerPlayerKit Behavior

> Enable or disable PerPlayerKit features like rekit on respawn, health restoration on kit load, and broadcast messages using the feature flags in config.yml.

Feature flags give you fine-grained control over how PerPlayerKit behaves on your server. Every flag lives under the `feature` key in `config.yml` and can be toggled independently — turn on automatic rekitting for a PvP server, add full-heal-on-kit-load for a casual experience, or strip all potion effects on respawn for a competitive environment, all without touching any other part of the plugin.

## Full Configuration Block

```yaml config.yml theme={null}
feature:
  set-health-on-kit-load: false
  set-hunger-on-kit-load: false
  set-saturation-on-kit-load: false
  remove-potion-effects-on-kit-load: false

  heal-on-enderchest-load: false
  feed-on-enderchest-load: false
  set-saturation-on-enderchest-load: false
  remove-potion-effects-on-enderchest-load: false

  rekit-on-respawn: true
  rekit-on-respawn-delay: 0
  rekit-on-kill: false

  broadcast-kit-messages: true
  broadcast-on-player-action: true

  send-update-message-on-join: true
  old-death-drops: false
```

***

## Kit Loading

These flags fire whenever a player loads a kit or enderchest. Use them to standardise the player's state at the moment gear is applied.

| Flag                                       | Default | Description                                                      |
| ------------------------------------------ | ------- | ---------------------------------------------------------------- |
| `set-health-on-kit-load`                   | `false` | Restores the player to full health when they load a kit.         |
| `set-hunger-on-kit-load`                   | `false` | Fills the player's hunger bar to maximum when they load a kit.   |
| `set-saturation-on-kit-load`               | `false` | Resets saturation to maximum when they load a kit.               |
| `remove-potion-effects-on-kit-load`        | `false` | Clears all active potion effects when they load a kit.           |
| `heal-on-enderchest-load`                  | `false` | Restores the player to full health when they load an enderchest. |
| `feed-on-enderchest-load`                  | `false` | Fills the hunger bar when they load an enderchest.               |
| `set-saturation-on-enderchest-load`        | `false` | Resets saturation when they load an enderchest.                  |
| `remove-potion-effects-on-enderchest-load` | `false` | Clears all active potion effects when they load an enderchest.   |

***

## Automation

These flags control when PerPlayerKit automatically re-applies a player's kit without requiring a manual command.

### `rekit-on-respawn`

Set to `true` (the default) to have PerPlayerKit automatically load the player's last-used kit the moment they respawn after death. This is the primary automation flag for PvP servers — players return to the action fully geared without any extra steps.

<Note>
  `rekit-on-respawn-delay` is measured in **ticks**, not seconds. There are 20 ticks per second, so a value of `40` equals a 2-second delay. Use a non-zero delay if another plugin (such as a spawn-protection or spawn-items plugin) also gives items on respawn and the two systems conflict.
</Note>

```yaml config.yml theme={null}
feature:
  rekit-on-respawn: true
  rekit-on-respawn-delay: 0   # set to e.g. 40 for a 2-second delay
```

### `rekit-on-kill`

When enabled, the player who lands the killing blow automatically reloads their last-used kit. The simple boolean form enables it in every world:

```yaml config.yml theme={null}
feature:
  rekit-on-kill: false
```

#### Advanced World Filtering

For more control, replace the boolean with the expanded object form to restrict or exclude specific worlds:

```yaml config.yml theme={null}
feature:
  rekit-on-kill:
    enabled: false
    world-whitelist: []
    world-blacklist: []
```

The plugin resolves the active world based on the **killer's** current world using this priority order:

<Steps>
  <Step title="Check the whitelist">
    If `world-whitelist` contains one or more world names, rekit-on-kill **only** activates in those worlds. The blacklist is ignored entirely.
  </Step>

  <Step title="Check the blacklist">
    If `world-whitelist` is empty but `world-blacklist` has entries, rekit-on-kill activates **everywhere except** the listed worlds.
  </Step>

  <Step title="Allow all worlds">
    If both lists are empty, rekit-on-kill activates in **every world**.
  </Step>
</Steps>

**Example — enable only in dedicated arena worlds:**

```yaml config.yml theme={null}
feature:
  rekit-on-kill:
    enabled: true
    world-whitelist:
      - "pvp_arena"
      - "duel_world"
    world-blacklist: []
```

**Example — enable everywhere except lobby and spawn:**

```yaml config.yml theme={null}
feature:
  rekit-on-kill:
    enabled: true
    world-whitelist: []
    world-blacklist:
      - "spawn"
      - "lobby"
```

<Note>
  If your existing config uses the old boolean form (`rekit-on-kill: true`), it will continue to work after a plugin update. PerPlayerKit will automatically add the new keys with default values — no manual migration is required.
</Note>

***

## Broadcast & Notifications

| Flag                          | Default | Description                                                                                                                                                                                                         |
| ----------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `broadcast-kit-messages`      | `true`  | Broadcasts a server-wide message when a player loads a kit or enderchest (e.g. "Player loaded a kit"). Set to `false` to silence these specific announcements.                                                      |
| `broadcast-on-player-action`  | `true`  | Broadcasts messages for other player actions such as copying a kit, repairing gear, or opening the kit room. This flag does **not** affect kit-loading messages — those are controlled by `broadcast-kit-messages`. |
| `send-update-message-on-join` | `true`  | Notifies players with the `perplayerkit.admin` permission when a new version of PerPlayerKit is available. Disable this if you manage updates through a separate monitoring system.                                 |

***

## Miscellaneous

| Flag              | Default | Description                                                                                                                                                                             |
| ----------------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `old-death-drops` | `false` | When `true`, items dropped on death fall in a tight cluster rather than scattering across the ground. Useful for servers where players want to quickly retrieve their gear after dying. |
