Economy Integration
Economy Integration
Section titled “Economy Integration”Courier can deposit currency into players’ accounts when they claim packages. Two options: the Impactor Economy API (recommended) or a command-based fallback that fires server commands.
Impactor API (Recommended)
Section titled “Impactor API (Recommended)”If Impactor is installed, flip one setting and you’re done.
File: config/courier/config.conf
economy { useImpactor = true}Currency keys use Impactor’s namespaced format. An empty string or "default" grabs the primary currency registered with Impactor.
currencies { "impactor:dollars" = 500 "impactor:tokens" = 10}Command-Based Fallback
Section titled “Command-Based Fallback”No Impactor? Set useImpactor to false and Courier will run server commands for currency operations instead.
File: config/courier/config.conf
economy { useImpactor = false defaultCommand = "eco give {player} {amount}" currencyCommands { pokedollars = "eco give {player} {amount}" tokens = "tokengive {player} {amount}" } runAsServer = true}When a currency key matches an entry in currencyCommands, that specific command runs. Otherwise, defaultCommand is the catch-all.
Command Placeholders
Section titled “Command Placeholders”These get replaced at claim time when a recipient claims a package containing currency:
| Placeholder | Replaced With |
|---|---|
{player} | The claiming player’s username |
{amount} | The currency amount being deposited |
{currency} | The currency key (e.g., pokedollars) |
{uuid} | The claiming player’s UUID |
runAsServer
Section titled “runAsServer”Controls how currency commands execute:
true— Commands run as the server console. This is what most economy plugins expect.false— Commands run as the claiming player. Only use this if your economy plugin specifically requires player-level execution.
Using Currency in Presets
Section titled “Using Currency in Presets”Add currency to the currencies block inside any preset:
currencies { "impactor:dollars" = 500 "impactor:tokens" = 10}For command-based economies, use the key names you defined in currencyCommands:
currencies { pokedollars = 500 tokens = 10}That’s it. When a player claims the package, Courier deposits the currency automatically.
Next Steps
Section titled “Next Steps”- Cross-Server Mail — deliver mail and currency across multiple servers
- Presets — build reusable mail templates with currency attachments
- Configuration — full config.conf reference