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) | Description | Type |
|---|---|---|
item | The ID of the shop item to buy. | STRING |
type | Which price to buy the item with. Choices: buy, alt_buy | STRING |
Optional arguments
| Key(s) | Description | Type | Default |
|---|---|---|---|
category | If set, the purchase only succeeds if the shop item belongs to this category. | STRING | |
amount | The number of the item to buy. | EXPRESSION | 1 |
price | Overrides the price charged for the purchase. | EXPRESSION | |
bypass-limits | If true, ignores purchase limits and affordability checks, only requiring that the buy type has a price configured. | BOOLEAN | false |
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
| Setting | Value |
|---|---|
| Run order | NORMAL |
| Supports delay | true |
| Reloads on plugin reload | true |