Promotions file
Every key of promotions.yml for sales, promo codes and referrals, with the formats and rules for each.
plugins/Emberstore/promotions.yml holds sales, promo codes and referrals. Everything ships switched off. How they behave for players is on Sales, promo codes and referrals. This page is the key reference.
Sales
Each key under sales is one sale, named however you like.
| Key | Default | What it does |
|---|---|---|
enabled | false | Turn this sale on or off. |
display-name | the key | Name of the sale. MiniMessage. |
type | required | percent or fixed. Fixed is in price-currency and is converted for other billing currencies. |
value | required | Percentage off (up to 100), or the fixed amount off. |
starts | none | When the sale starts, in server time, like 2026-12-20T00:00:00. Leave out for no start limit. |
ends | none | When it ends. Leave out for no end limit. Must not be before starts. |
applies-to | [] | Categories (ranks) or items (ranks/vip). Empty means everything. |
allow-codes | true | Allow a promo or referral code on top of this sale. |
Codes
Each key under codes is the code itself, as players type it (not case sensitive, letters, digits, _ and -, up to 32 characters).
| Key | Default | What it does |
|---|---|---|
enabled | false | Turn this code on or off. |
type | required | percent or fixed. |
value | required | Percentage off, or the fixed amount off. |
max-uses | unlimited | Total uses across all players. |
per-player | unlimited | Uses per buyer. |
expires | never | When the code stops working, in server time. |
applies-to | [] | Categories or items. Empty means everything. |
The code field shows in checkout as soon as codes has any entry or referrals are on, even if every code is disabled. Delete codes you do not use to hide the field.
Referrals
| Key | Default | What it does |
|---|---|---|
enabled | false | Turn the referral system on or off. |
first-purchase-only | true | Only a buyer's first completed purchase can use a referral code. |
buyer-discount.type | percent | percent or fixed. |
buyer-discount.value | 5 | Percentage off, or the fixed amount off. |
referrer-commands | [] | Console commands run for the referrer when the referred purchase completes. %player% is the referrer, %buyer% the buyer. |
referrer-amount | 0 | Amount paid to the referrer through Vault. 0 for none. |
Checking your file
Run /store admin reload. The console lists how many sales and codes loaded and whether referrals are on. An entry with a mistake (an unknown type, a date that is not in the 2026-12-31T23:59:59 form, a percent above 100) is skipped with a warning that names it. An applies-to target that is not a loaded category or item is warned about, but kept.