buy_item

Buys a shop item on the player's behalf, as if they had purchased it through the shop.

Categories: economy

Required arguments

Key(s)DescriptionType
itemThe ID of the shop item to buy.STRING
typeWhich price to buy the item with.
Choices: buy, alt_buy
STRING

Optional arguments

Key(s)DescriptionTypeDefault
categoryIf set, the purchase only succeeds if the shop item belongs to this category.STRING
amountThe number of the item to buy.EXPRESSION1
priceOverrides the price charged for the purchase.EXPRESSION
bypass-limitsIf true, ignores purchase limits and affordability checks, only requiring that the buy type has a price configured.BOOLEANfalse

Trigger parameters required

  • PLAYER

Example

effects:
  - id: buy_item
    args:
      item: <value>
      type: buy|alt_buy
      category: <value> # ← Optional
      amount: 1 + %level% # ← Optional
      price: %level% * 100 # ← Optional
      bypass-limits: true # ← Optional

Behaviour

SettingValue
Run orderNORMAL
Supports delaytrue
Reloads on plugin reloadtrue