give_weighted_random_item
Gives the player one item chosen from a weighted list, optionally placing it into a specific inventory slot.
Categories: inventory
Required arguments
| Key(s) | Description | Type |
|---|
items | A list of weighted item groups. Each entry has a weight and an items list. | DYNAMIC |
items entries
| Key | Description | Type | Required |
|---|
items | The items in this group, in eco item lookup format. | STRING_LIST | yes |
weight | The relative weight of this group when choosing what to drop. | DOUBLE | yes |
Optional arguments
| Key(s) | Description | Type | Default |
|---|
slot | The inventory slot type to place the item into. If omitted the item is dropped into the player's inventory via telekinesis. | STRING | |
Trigger parameters required
Example
effects:
- id: give_weighted_random_item
args:
items:
- items:
- <value>
weight: <value>
slot: mainhand # ← Optional
Behaviour
| Setting | Value |
|---|
| Run order | NORMAL |
| Supports delay | true |
| Reloads on plugin reload | true |