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โ€‹