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)DescriptionType
itemsA list of weighted item groups. Each entry has a weight and an items list.DYNAMIC

items entries

KeyDescriptionTypeRequired
itemsThe items in this group, in eco item lookup format.STRING_LISTyes
weightThe relative weight of this group when choosing what to drop.DOUBLEyes

Optional arguments

Key(s)DescriptionTypeDefault
slotThe 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

  • PLAYER

Example

effects:
  - id: give_weighted_random_item
    args:
      items:
        - items:
            - <value>
          weight: <value>
      slot: mainhand # ← Optional

Behaviour

SettingValue
Run orderNORMAL
Supports delaytrue
Reloads on plugin reloadtrue