Vault Integration
As of version 7.1.0, EliteMobs supports Vault integration (using VaultAPI 1.7). You are able to turn on Vault to unify the EliteMobs economy with your server's economy.
Now here's why that's a bad idea:
EliteMobs has no leveling system. The progression system is tied to getting better items through killing Elite Mobs and buying higher guild ranks to access higher level loot, higher level mobs, higher level quests and, higher level arena challenges and dungeons.
Additionally, EliteMobs has a very delicate balance when it comes to purchasing charms and reselling loot obtained from Elite Mobs.
Therefore, if you combine your server's economy with the EliteMobs economy, players will be able to easily buy their way to the top, potentially bypassing the learning curve.
Now the progression system won't work properly, which leads to even worse problems. High level Elite Mobs have various powers, and players are meant to slowly learn those powers through fighting against them for dozens of hours, learning how to identify the powers that the Elite Mobs have and how to counter those powers, as well as learning how to prepare to go into combat against Elite Mobs.
If players skip straight to the endgame, they will feel like the combat difficulty is nearly impossible and extremely unfair, as they will not have had the time to develop the knowledge required to kill the EliteMobs efficiently through long hours of play.
Requirements
To use Vault integration, you must have:
- Vault plugin (version compatible with VaultAPI 1.7+)
- An economy plugin that registers with Vault (EssentialsX, CMI, etc.)
- Both plugins properly configured and running
EliteMobs will automatically detect Vault and use it if enabled in config.
Configuration
To enable Vault integration:
- Ensure Vault plugin is installed on your server
- Ensure you have an economy plugin that works with Vault (e.g., EssentialsX, CMI, etc.)
- Open
EconomySettings.ymlin the EliteMobs plugin folder - Set
useVault - not recommended: true - Restart the server
Example configuration:
# WARNING: Enabling this is not recommended! See above for reasons.
useVault - not recommended: false
Note: The configuration key deliberately includes "- not recommended" to remind you of the gameplay implications.
How It Works
When Vault integration is enabled:
- All EliteMobs currency (Elite Coins) is converted to your server's main economy currency
- Players earn your economy currency instead of Elite Coins when killing Elite Mobs
- Guild rank purchases, shop transactions, and all other EliteMobs economy features use your server's economy
- The EliteMobs economy system is completely replaced by Vault
Currency operations:
- Deposits: Money is added to player's Vault balance
- Withdrawals: Money is removed from player's Vault balance
- Balance checks: Queries player's Vault balance
- Direct balance setting: DISABLED for safety (use your economy plugin)
If Vault fails to initialize or becomes unavailable, EliteMobs will automatically fall back to its internal economy system.
Security Features
For security reasons, EliteMobs does NOT support directly setting a player's currency balance through Vault. Any attempt to do so will be blocked and logged. Use your economy plugin's commands to set balances directly if needed.
Example Scenario
Without Vault:
- Player kills level 50 Elite Mob
- Receives 100 Elite Coins (stored in EliteMobs database)
- Can spend Elite Coins only in EliteMobs shops
With Vault:
- Player kills level 50 Elite Mob
- Receives 100 [your economy currency] (stored in Vault/economy plugin)
- Can spend money in EliteMobs shops AND anywhere else on server
- Other players can send money to buy EliteMobs services
- Economy is unified across all plugins
This is why it's not recommended: It breaks the intended progression system by allowing players to use currency from other sources.
Troubleshooting
If Vault integration is enabled but not working:
-
Check server logs for: "[EliteMobs] Vault detected."
- If missing: Vault plugin is not installed or not loading
-
Check for warning: "Something went wrong with the vault configuration"
- Cause: Vault version incompatibility
- Solution: Update Vault to latest version or disable integration
-
Check for: "Player checked currency with no economy entry"
- Cause: Economy plugin hasn't created player account
- Solution: Check your economy plugin configuration
-
If enabled but EliteMobs still uses Elite Coins:
- Verify config key is exactly: "useVault - not recommended: true"
- Restart server after config change
- Check that an economy plugin is registered with Vault
Additional Resources
For the latest information about Vault integration, see: https://magmaguy.com/wiki.html (search for "Vault")
Note: The GitHub wiki has been migrated to the above location.
For Developers
If you're developing an addon or integration:
- Vault status: Check
VaultCompatibility.VAULT_ENABLED(static boolean) - Economy API: Use
EconomyHandlermethods (not VaultCompatibility directly) - Supported operations: add, subtract, check (set is disabled)
- Currency precision: Internal system uses 2 decimal places
- Fallback: Economy automatically falls back if Vault fails
Source code location:
- src/main/java/com/magmaguy/elitemobs/economy/VaultCompatibility.java
- src/main/java/com/magmaguy/elitemobs/economy/EconomyHandler.java
EliteMobs uses VaultAPI 1.7 as a compile-only dependency. The Vault plugin JAR must be present on the server at runtime.