Skip to content

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.

Multiplier:
Purchasable: true
Economy: RivalCredits
Price: 250
Step: 0.1
Max: 1.5
Premium-Pass:
Purchasable: true
Economy: RivalCredits
Price: 2500

Economy 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.

  • Premium-Pass.Price is a one-time price.
  • Multiplier.Price is charged per step. Each step adds Step to the player’s multiplier, up to Max. With the defaults that is five purchases of 250 to go from 1.0x to 1.5x.
  • If Step does not divide evenly into the range, the last step is cut short to land exactly on Max, and it still costs the full Price.

Prices are whole numbers.

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.

  1. 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 DENY and, for maxed / owned / not enough money, flashes a temporary icon on the button.
  2. If the check passes, the confirm menu opens. No money has moved yet.
  3. [confirm] checks everything again, takes the money and applies the purchase. The player’s data is saved immediately, the PURCHASE sound plays and they return to the battle pass menu.
  4. [cancel] or Escape returns to the battle pass menu without charging.

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: false
battlepassadmin premiumpass give {player}
battlepassadmin multiplier {player} 1.5

Use 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 take removes the pass but keeps premium rewards already claimed.
  • /battlepassadmin reset clears 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.