Skip to main content

Economy System

SigmaTools provides comprehensive economy integration with support for multiple economy plugins.

Supported Economy Plugins

Vault

Works with any Vault-compatible economy plugin:

  • EssentialsX
  • CMI
  • iConomy
  • BOSEconomy
  • And more

CoinsEngine

Alternative economy system:

  • Multi-currency support
  • Advanced features
  • Modern API

Configuration

Enable Economy

economy:
enabled: true
currency: "vault" # or "coins"

Set Tool Costs

economy:
costs:
pickaxe: 10.0 # Cost per use
axe: 5.0
bucket: 1.0
hoe: 2.0

Set Tool Rewards

economy:
rewards:
pickaxe: 1.0 # Reward per block
axe: 0.5 # Reward per log
bucket: 0.1 # Reward per operation
hoe: 0.3 # Reward per crop

How It Works

Cost Deduction

  1. Player uses tool
  2. Plugin checks if player can afford cost
  3. If yes, deducts cost before operation
  4. If no, blocks operation and shows message

Reward Distribution

  1. Player successfully uses tool
  2. Plugin calculates reward based on operations
  3. Adds reward to player balance
  4. Shows cumulative reward in action bar

Action Bar Display

The action bar shows:

  • Costs: 💰 -$10.00 (red)
  • Rewards: 💰 +$5.00 (green)
  • Combined: 💰 -$10.00 | 💰 +$5.00

Display duration: 5 seconds, then auto-resets.

Currency Detection

Vault Currency

  • Symbol: 💰
  • Format: $1.00 (with decimals)
  • Example: 💰 -$10.00

CoinsEngine Currency

  • Symbol: 🪙
  • Format: 1 (no decimals)
  • Example: 🪙 -10

Bypass Permissions

Admins can bypass economy:

# Bypass all economy
/lp user PlayerName permission set sigmatools.bypass.economy true

Effect:

  • No costs deducted
  • No rewards given
  • Tools are free to use

Economy Messages

Customize economy messages in messages.yml:

economy:
insufficient-funds: "&c💰 You need %amount% %currency% to use this tool!"
cost-deducted: "&e💰 Cost: %amount% %currency%"
reward-earned: "&a💰 Reward: %amount% %currency%"

API Integration

Use the API to interact with economy:

SigmaToolsAPI api = Bukkit.getServicesManager().load(SigmaToolsAPI.class);

// Get balance
EconomyResult balance = api.getBalance(player);

// Deduct currency
EconomyResult deduct = api.deduct(player, 10.0);

// Give reward
EconomyResult reward = api.reward(player, 5.0);

Best Practices

Balanced Economy

economy:
costs:
pickaxe: 5.0
axe: 3.0
rewards:
pickaxe: 0.5 # Small reward

Premium Tools

economy:
costs:
pickaxe: 50.0 # High cost
rewards:
pickaxe: 0.0 # No rewards

Free Tools

economy:
enabled: false # Disable economy

Troubleshooting

Economy Not Working

  1. Verify economy plugin is installed
  2. Check economy.enabled: true
  3. Verify currency setting matches plugin
  4. Test economy: /balance or /coins

Costs Not Deducted

  1. Check player has sufficient balance
  2. Verify economy.costs is set
  3. Check bypass permission not granted
  4. Enable debug logging

Rewards Not Given

  1. Check economy.rewards is set
  2. Verify economy plugin is working
  3. Check bypass permission not granted
  4. Enable debug logging

Next Steps