Economy Configuration

circle-info

The Economy module handles all currency systems in PhantomDungeons. Each economy file represents a unique currency that players can earn, spend, and manage.


Quick Start

Creating a New Economy

Creating a new economy is simple:

1

Create the file

Navigate to plugins/PhantomDungeons/economies/

2

Add a new YAML

Create a new file: {currency-id}.yml

3

Configure

Configure the currency settings

4

Reload

Restart or reload the plugin

circle-check

Misc Configuration

Sword Currency Integration

is-sword-currency: true
circle-info

What is a Sword Currency?

When is-sword-currency: true, this economy automatically increments by 1 for each sword swing. This is typically used for Sword XP-based progression systems.

Example: Sword XP Currency

currency-name: 'Sword XP'
is-sword-currency: true
starting-balance: 0

Players gain 1 Sword XP every time they swing their dungeon sword, enabling leveling progression.


Vault Integration

circle-info

Vault Support

Set vault-currency: true to register this economy as the primary Vault economy. This allows other plugins to interact with your economy through Vault's API.


Command System

Root Command Configuration

Example Usage:

  • /money - Opens help or checks balance

  • /balance - Alias for /money

  • /wallet - Another alias


Command Nodes

Node
Permission
Description
Example

balance

phantom.{currency}.balance

Check own balance

/money balance

balance (others)

phantom.{currency}.balance.others

Check other's balance

/money balance Player

give

phantom.{currency}.give

Give currency to player

/money give Player 1000

set

phantom.{currency}.set

Set player's balance

/money set Player 5000

remove

phantom.{currency}.remove

Remove currency from player

/money remove Player 500

circle-exclamation

Messages Configuration

Each economy has fully customizable messages with sound effects:

Available Message Keys

circle-info

Every message automatically parses PlaceholderAPI if available, if you wish to have additional formatting, please use our built in math placeholders here or external ones.

Key
Placeholders
Description

BALANCE

%amount%

Shown when checking own balance

BALANCE_OTHERS

%player%, %amount%

Shown when checking another player's balance

GIVE_SUCCESS

%player%, %amount%

Sent to admin who gives currency

GIVE_RECEIVER

%sender%, %amount%

Sent to player receiving currency

SET_SUCCESS

%player%, %amount%

Sent when setting balance

REMOVE_SUCCESS

%player%, %amount%

Sent when removing currency

INVALID_PLAYER

%player%

Player not found

INVALID_AMOUNT

%amount%

Invalid amount specified

NOT_ENOUGH_FUNDS

-

Insufficient balance

CANNOT_SEND_TO_SELF

-

Attempted to send money to self

PLAYER_HELP

-

Player help menu

ADMIN_HELP

-

Admin help menu


Amount Format Placeholders

When you use %amount% in any message, the following utility placeholders are automatically available:

Placeholder
Description
Example

%amount%

Raw formatted amount with display format applied

&a1,000

%amount_formatted%

Amount with thousands separator but no display format

1,000

%amount_abbreviated%

Shortened notation (k, M, B, T)

1.2k

%amount_plain%

Amount with specified decimal places only

1000.50

circle-info

Example Usage:

If you want to show the balance in multiple formats:

Output: Full: 1,000,000 | Short: 1.2M


Complete Example

Here's a fully configured "Souls" currency:


Last updated