Emberstore logoEmberstore

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.

A typed code is checked against promo codes first and referral codes second. Any failure shows the same reason so codes cannot be guessed.

Sales

Each key under sales is one sale, named however you like.

KeyDefaultWhat it does
enabledfalseTurn this sale on or off.
display-namethe keyName of the sale. MiniMessage.
typerequiredpercent or fixed. Fixed is in price-currency and is converted for other billing currencies.
valuerequiredPercentage off (up to 100), or the fixed amount off.
startsnoneWhen the sale starts, in server time, like 2026-12-20T00:00:00. Leave out for no start limit.
endsnoneWhen 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-codestrueAllow 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).

KeyDefaultWhat it does
enabledfalseTurn this code on or off.
typerequiredpercent or fixed.
valuerequiredPercentage off, or the fixed amount off.
max-usesunlimitedTotal uses across all players.
per-playerunlimitedUses per buyer.
expiresneverWhen the code stops working, in server time.
applies-to[]Categories or items. Empty means everything.

Referrals

KeyDefaultWhat it does
enabledfalseTurn the referral system on or off.
first-purchase-onlytrueOnly a buyer's first completed purchase can use a referral code.
buyer-discount.typepercentpercent or fixed.
buyer-discount.value5Percentage 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-amount0Amount 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.

On this page