Economy — Admin Commands
/ecoadmin
| Command | Arguments | Permission | Description |
|---|---|---|---|
/ecoadmin get <player> [currency] | player: OnePlayer; currency: String(configured currency; crowns by default) | gate.economy.admin | Shows a player's balance for one currency |
/ecoadmin set <player> <amount> [currency] | player: OnePlayer; amount: Double(currency policy); currency: String(configured currency; crowns by default) | gate.economy.admin | Sets a player's currency balance to an exact amount |
/ecoadmin give <player> <amount> [currency] | player: OnePlayer; amount: Double(positive); currency: String(configured currency; crowns by default) | gate.economy.admin | Adds to a player's currency balance |
/ecoadmin take <player> <amount> [currency] | player: OnePlayer; amount: Double(positive); currency: String(configured currency; crowns by default) | gate.economy.admin | Removes from a player's currency balance |
Transaction audit metadata
Economy mutations accept an optional TransactionCode containing:
code: stable lowercase identifier used for indexed analysis, such asgateshop.player_shop_buydescription: stable human-readable explanation stored with the audit row
val code = TransactionCode(
code = "myplugin.reward",
description = "Currency granted by the daily reward.",
).withDetails(
reference = "reward:daily",
"reward_id" to "daily",
"source" to "login_streak",
)
GEconomy.giveMoney(player, amount, code)
GateCraft's existing transaction paths supply plugin-owned codes for economy commands, Vault, shops, towns, zones, items, RPG interactions, skills, and structures. Compatibility overloads still allow metadata to be omitted.
The optional reference identifies the affected domain object and is suitable for indexing. details are stored as
JSON for event-specific context. Shop transactions use references such as shop:123 and include the item material,
custom GateItems ID, item name, quantity, unit price, total price, owner, and shop flags. NPC trades similarly include
the NPC ID and purchased item.
The external economy_transaction_audit schema must include these nullable columns:
transaction_code VARCHAR(96)— index for grouped analysistransaction_description VARCHAR(255)transaction_reference VARCHAR(128)— index for domain-object historytransaction_metadata JSON