Skip to main content

Economy System

Integrates with Vault (EssentialsX, CMI, iConomy, BOSEconomy, etc.) or CoinsEngine for per-tool costs and rewards.

Configurationโ€‹

economy:
enabled: true
currency: "vault" # or "coins"
costs:
pickaxe: 10.0 # cost per use
axe: 5.0
bucket: 1.0
hoe: 2.0
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

See Configuration for the full key reference.

Behaviorโ€‹

  • Cost: checked and deducted before the operation runs; blocked with a message if the player can't afford it.
  • Reward: calculated from operation count (blocks/logs/crops) and added to balance on success.
  • Action bar: shows cumulative cost/reward for 5 seconds, then auto-resets. Vault shows ๐Ÿ’ฐ -$10.00 / ๐Ÿ’ฐ +$5.00 (decimal); CoinsEngine shows ๐Ÿช™ -10 / ๐Ÿช™ +10 (integer).

Bypassโ€‹

sigmatools.bypass.economy - no costs deducted, no rewards given. See Permissions.

Messagesโ€‹

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

SigmaToolsAPI api = Bukkit.getServicesManager().load(SigmaToolsAPI.class);
EconomyResult balance = api.getBalance(player);
EconomyResult deduct = api.deduct(player, 10.0);
EconomyResult reward = api.reward(player, 5.0);

See Alsoโ€‹