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

Below are the different Price types you can use.

TypeAlisases
Standard Economy$, coins
XP Pointsxp, exp, experience
XP Levelsl, levels, xplevels
Points<point_id>, eg souls
Magic<magic_id, eg mana
Player Points (External)p_points, player_points
EcoBits<ecobits_id>
UltraEconomy (External)<currency_id>
ItemsUse the item-lookup-system here

Effects System

Prices are seamlessly integrated into the effects system. Below, you'll find a list of all available effects and conditions.

Effect/ConditionTypeLink
give_priceEffectLink
pay_priceEffectLink
can_afford_priceConditionLink

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