🔖Example: Discount
Create Conditional Placeholder
Use conditional placeholder with MAX or MIN mode, discount feature can be easily implemented.
Here we created 2 conditional placeholder for buy and sell.
mode: MAX
value:
default: 1
vip: 1.5
mvp: 2
conditions:
vip:
1:
type: permission
permission: 'group.vip'
mvp:
1:
type: permission
permission: 'group.mvp'Use the placeholder in product configs
5is base price, then add{conditional_buy}or{conditional_sell}before it.If player meet vip condition, the
{condition_buy}will return0.5, so he will only need pay0.5*4which means only2.5coins!
Auto Apply Discount
Start from 2.3.2, you can auto apply conditional placeholder to all prices! Just configure it in
config.ymlfile. This can helps you auto add discount for each products.
It is recommend you disable this feature for dynamic price, if you want to enable it for dynamic price too, just change
black-dynamic-priceoption to false here!If you want to disable this feature for specified shops, use
black-shopsoption.
Last updated