Selling the Pass
Set up the Premium Pass and the EXP multiplier as in-game purchases, pick a currency, or sell them on a webstore.
Players can buy two things in the /battlepass menu: the Premium Pass (the profile head) and
multiplier steps (the potion). Each product has its own currency, price and on/off switch in
config.yml.
1. Pick a currency
Section titled “1. Pick a currency”Multiplier: Purchasable: true Economy: RivalCredits Price: 250 Step: 0.1 Max: 1.5
Premium-Pass: Purchasable: true Economy: RivalCredits Price: 2500Economy takes Vault, PlayerPoints, RivalCredits, or another Optimal plugin’s currency as
<PROVIDER>_<currency>:
| You use | Set Economy to |
|---|---|
| A normal money plugin (EssentialsX, CMI, …) | Vault (install Vault too) |
| PlayerPoints | PlayerPoints |
| RivalCredits | RivalCredits |
| OptimalCredits | OPTIMALCREDITS_CREDITS |
| OptimalMobcoins | OPTIMALMOBCOINS_MOBCOINS |
| An OptimalGens currency | OPTIMALGENS_<currency id> |
The two products can use different currencies, for example money for multiplier steps and a premium currency for the pass.
After /battlepassadmin reload, check the console. A warning like
Economy provider '...' is unavailable means that currency plugin is missing or not loaded; players
then get PURCHASE-UNAVAILABLE when they click. A name that is not a valid provider at all stops the
reload with an error.
2. Set prices and the multiplier curve
Section titled “2. Set prices and the multiplier curve”Premium-Pass.Priceis a one-time price.Multiplier.Priceis charged per step. Each step addsStepto the player’s multiplier, up toMax. With the defaults that is five purchases of 250 to go from1.0xto1.5x.- If
Stepdoes not divide evenly into the range, the last step is cut short to land exactly onMax, and it still costs the fullPrice.
Prices are whole numbers.
3. Update the menu text
Section titled “3. Update the menu text”The default lore says Credits next to the prices, because the default currency is RivalCredits.
If you switch currency, edit the Multiplier-Item in
guis/battlepass-menu.yml and the
Info-Item, Confirm-Item lore in both confirm menus.
How a purchase works
Section titled “How a purchase works”- The player clicks the potion or the head. The plugin checks the purchase (enabled, not maxed / not
owned, currency available, enough money). A refusal sends a message, plays
DENYand, for maxed / owned / not enough money, flashes a temporary icon on the button. - If the check passes, the confirm menu opens. No money has moved yet.
[confirm]checks everything again, takes the money and applies the purchase. The player’s data is saved immediately, thePURCHASEsound plays and they return to the battle pass menu.[cancel]or Escape returns to the battle pass menu without charging.
Selling on a webstore instead
Section titled “Selling on a webstore instead”To sell the pass (or multipliers) only through your store, turn off the in-game purchase and grant it from your store’s command:
Premium-Pass: Purchasable: falsebattlepassadmin premiumpass give {player}battlepassadmin multiplier {player} 1.5Use whatever placeholder your store uses for the player name. These commands work for offline
players who have joined before, so a purchase made while the player is offline still applies.
/battlepassadmin multiplier sets an exact value and is not limited by Max.
With Purchasable: false, clicking the button sends PREMIUM-NOT-PURCHASABLE (or
MULTIPLIER-NOT-PURCHASABLE). Reword those messages in
messages.yml to point players at your store, and change the
button lore so it no longer says “Click to purchase!”.
- Owning the pass makes every already-reached premium reward claimable, including tiers reached before the purchase.
/battlepassadmin premiumpass takeremoves the pass but keeps premium rewards already claimed./battlepassadmin resetclears the pass and the multiplier along with EXP and claims.{total-rewards}and{claimed-rewards}in the profile head only count premium rewards for players who own the pass.
