premium banner
The best economy api for your hytale server! Have all your mods work together❤

Description

 

EconomyAPI

One api to support them all!

A lightweight, developer-friendly economy backbone for Hytale servers. It automaticaly hooks into TheEconomy, EcoTale, HyEssentialsX and VaultUnlocked (Player guide)

EconomyAPI is a core utility designed to handle the "heavy lifting" of currency management. It provides a centralized system for storing, retrieving, and modifying player balances, allowing other mods to focus on features like shops, auctions, or land claims without worrying about a centeralized money system. But it also acts like a bridge so that mods made using this API can also work with other economy systems. Also fully compatible with any plugin that uses VaultUnlocked!


Want a physical currency?

Just install SimpleBanker and you have a complete customisable phisicale curency system that works flawlessly with this API!


🎮 For Players

By itself, this mod is a Library/Dependency. It doesn't add items or blocks to the game world. You likely need this because another mod you enjoy (like a Shop or Trading mod) uses it to manage money.

Available Commands:

If any other economy plugins overwrite these commands you can still use /eco, /ecoapi, /economyapi infront of the command to use this plugin or dissable the commands from the other plugin.

Command Description Permission
/balance (player)
/bal
Check someones balance economyapi.user.command.balance
/pay Pay someone economyapi.user.command.pay
/baltop Check the 5 richest players on your server economyapi.user.command.baltop
/economyapi
/economy
/eco
Check the credits for this mod economyapi.user.command.economy
/eco stats Shows some cool stats about the server's economy economyapi.user.command.stats
/eco admin Opens the admin gui economyapi.admin.command.adminui
/setbalance <player> <amount>
/setbal
Sets a player's balance to a specific value. economyapi.admin.command.setbalance
/deposit <player> <amount>
/addbal
/givebal
Gives the player money economyapi.admin.command.deposit
/withdraw <player> <amount>
/rembal
/takebal
Takes money from a player economyapi.admin.command.withdraw
/eco save Force save all data economyapi.admin.command.forcesave


You can gain money by killing mobs.

Placeholders:

*REQUIRES Placeholdar(PHAR) or Placeholder API(PAPI)

%economyapi_balance% --> Gets the raw balance from the player eg. 5257.96
%economyapi_formatted_balance% --> Gets the formatted balance eg. $5,257.96
%economyapi_formatted_balance_short% --> Gets the short formatted balance eg. $5.9k
%economyapi_prefix% --> Gets the economy prefix from the config eg. $
%economyapi_starting_balance% --> Gets the default starting ballance (Non formatted) eg. 500.0
%economyapi_provider% --> Gets the current active provider eg. Internal, TheEconomy, ...
%economyapi_cache_username% --> Gets the cached username of the provided uuid eg. sennecoolgames
%economyapi_server_total% --> Shows the total amount of money in circulation
%economyapi_server_average% --> Shows the average amount of money for a player
%economyapi_server_highest% --> Shows the highest balance in the server
%economyapi_server_accounts% --> Shows the number of active accounts
%economyapi_bridge_mode% --> Shows the bridge mode that the plugin is using
%economyapi_storage_type% --> Show the storage type the server is currently using
%economyapi_config_mobkill_min% --> Shows the minimum mobkill reward
%economyapi_config_mobkill_max% --> Shows the maximum mobkill reward
%economyapi_config_playerkill_min% --> Shows the minimum playerkill reward
%economyapi_config_playerkill_max% --> Shows the maximum playerkill reward


📦 Installation

  1. Download the EconomyAPI.jar.

  2. Place it into your server's mods folder.

  3. Restart the server.

⚙️Configuration

{
  "currencyPrefix": "$",
  "logRetentionDays": 7,
  "startingBalance": 500.0,
  "bridgeMode": "none" // See Bridge Modes
  "formatType": "US",
  "disableMobKillRewards": false,
  "disablePlayerKillRewards": false,
  "rewards":  {
    "mobKillMin": 5.0,
    "mobKillMax": 10.0,
    "playerKillMin": 50.0,
    "playerKillMax": 75.0
  },
  "storageType": "json",
  "mongodb": {
    "uri": "mongodb://localhost:27017",
    "database": "economyapi"
  },
  "mysql": {
    "uri": "mysql://localhost:3306",
    "database": "economyapi",
    "username": "economyuser",
    "password": "economyPassword"
  }
}


Bridge Modes:

The mod will also check for a bridge provider on first startup. You can always change it in the cofig.


💿Mods using this API


👨‍💻 For Developers

Stop reinventing the wheel! Use EconomyAPI as your server's single source of truth for currency.

Why use this API?

  • Persistent Storage: Automatically saves to a balances.json file in the plugin data folder.
  • Namechange-Safe: Uses Hytale's UUID system to ensure data persists even if players change names.
  • Easy Access: Simple integration via our api

How to youse the API?

Check our wiki


Coming Soon

  • Shop