keep_item
Keeps an item in the player's inventory when they die, instead of it being dropped.
Categories: inventory, player
Optional arguments
| Key(s) | Description | Type | Default |
|---|---|---|---|
slot | The inventory slot of the item to keep, e.g. mainhand or slot_0. If omitted, the item providing this effect is kept. | STRING | |
chance | The percent chance (0-100) that each item is kept on death. If omitted, the item is always kept. Supports expressions and placeholders. | EXPRESSION |
Example
effects:
- id: keep_item
args:
slot: mainhand # ← Optional
chance: 50 # ← Optional
Behaviour
| Setting | Value |
|---|---|
| Run order | NORMAL |
| Supports delay | true |
| Reloads on plugin reload | true |