Skip to main content

Prices

What are Prices?

Lots of servers have lots of different types of economies. Maybe you have a standard vault economy, maybe you have an item-based economy, maybe you're using points, or something else entirely.

To simplify this, there's a unified way to handle all of this: the price system. For price values, you can use math to create adaptive/versatile pricing systems.

Types

$, coins: Standard economy, this is what you'll use if you have an economy plugin installed

xp, exp, experience: Experience points (not levels)

l, levels, xplevels, explevels: Experience levels

p_points, player_points: PlayerPoints points (third-party plugin)

points work as types, such as souls

Magic Types work as types, such as magic

You can also use custom currencies from plugins like EcoBits and UltraEconomy.

And for item-based economies, you can pass in an item lookup string as the type to take items.

Display Names

You can specify display names for each price individually, however this might be quite cumbersome, especially if you use prices in lots of places.

So, instead of configuring your price like this:

price:
value: 100 * %player_y%
type: crystals # EcoBits currency
display: "&b%value% Crystals ❖"

You can add the following to /plugins/eco/lang.yml:

price-display:
- type: crystals
display: "&b%value% Crystals ❖"

This will override any per-price formatting, which should make your life much easier to achieve consistency between different prices.

You can display prices in two ways, using %value% which will return the number unformatted (e.g. $1234567.89), or you can use %value_commas% to format the price with commas (e.g. $1,234,567.89).

Config Examples

price:
value: 100 * %player_y%
type: crystals # EcoBits currency
price:
value: 16
type: ecoitems:shiny_diamond
display: "%value% &fShiny Diamonds" # Uses local display
price:
value: 5000
type: xp
price:
value: 10
type: mana # EcoSkills magic