What is Vault Unlocked?
Note this is a fork of the original Vault, see the Enhanced Functionality section for what this provides over the original Vault
VaultUnlocked is a versatile API designed to streamline the integration of permissions, chat, and economy systems for plugins. It provides developers with a unified interface, eliminating the need to individually hook or depend on each plugin. This tool was created as a response to the shortcomings of existing APIs like Register and other Permissions systems, which often suffer from either a lack of necessary features or overly complex implementations. VaultUnlocked's goal is to simplify the process, making it more intuitive for developers to support various systems seamlessly.
With its user-friendly approach, VaultUnlocked offers extensive support for different systems, allowing plugins to operate smoothly within diverse environments. The API’s design prioritizes simplicity and effectiveness, addressing the frustrations developers faced with previous solutions. By providing a cohesive and easy-to-use platform, VaultUnlocked enhances the functionality of plugins, ensuring that they can easily connect with permissions, chat, and economy systems without the need for cumbersome workarounds or dependencies.
If you're wondering if the plugin you use supports the extended VaultUnlocked functionality, including multiple currencies, look for the VaultUnlocked badge on the plugin page! If you're a developer and looking to have your project review to get the VaultUnlocked Economy badge, please open a ticket here: Github Badge Review.
Badge:
Enhanced Functionality(What VaultUnlocked Provides that Vault doesn't):
VaultUnlocked offers significant improvements over the existing plugin, particularly for those that implement the updated API. It brings a range of enhanced functionalities, making it a more powerful and flexible tool for developers.
Why VaultUnlocked
Choosing VaultUnlocked over Vault offers a range of benefits that make it a superior choice for plugin developers and server administrators. VaultUnlocked builds upon the foundation of Vault but introduces enhanced features, such as multicurrency support, better compatibility with popular plugins, and the ability to work seamlessly with advanced server frameworks like Folia. Additionally, VaultUnlocked is actively developed, ensuring that it stays up-to-date with the latest advancements and provides more reliable, precise operations, especially in complex economic systems. This combination of modern features and ongoing support makes VaultUnlocked the more robust and future-proof option for managing permissions, chat, and economy systems in your server environment.
Additional Functionality:
- Multicurrency Support: Allows for the management of multiple currencies within the same environment.
- Active Development: Ensures continuous improvements and updates to the API.
- Folia Support: Provides compatibility with the Folia server framework.
- Better Compatibility: Improved integration with plugins like Towny, enhancing overall performance.
- UUID Support: Facilitates the use of universally unique identifiers, thanks to contributions from LlmDl.
- BigDecimal Support: Enables precise and accurate currency calculations, also contributed by LlmDl.
Multicurrency Support
VaultUnlocked introduces multicurrency support, allowing servers to manage and operate with multiple currencies simultaneously. This functionality is particularly useful in complex economic systems where different regions or factions might use different types of currency. By providing a seamless way to handle various currencies, VaultUnlocked ensures that economic transactions are both flexible and accurate, catering to diverse gameplay needs.
Active Development
One of the key strengths of VaultUnlocked is its ongoing active development. The developers behind VaultUnlocked are committed to continuously improving and updating the API, ensuring it remains compatible with the latest plugins and server frameworks. This active development approach guarantees that users benefit from the latest features, bug fixes, and optimizations, keeping the API relevant and reliable in the ever-evolving landscape of Minecraft plugins.
Folia Support
VaultUnlocked also provides compatibility with Folia, a server framework known for its enhanced performance and scalability. Folia support means that plugins using VaultUnlocked can fully leverage the advanced capabilities of this framework, resulting in smoother and more efficient server operations. This makes VaultUnlocked an ideal choice for servers that prioritize high performance and stability.
Better Compatibility
Improved compatibility with popular plugins, such as Towny, is another standout feature of VaultUnlocked. By ensuring better integration with these plugins, VaultUnlocked enhances the overall performance and user experience. This compatibility means fewer conflicts and smoother interactions between different plugins, allowing server administrators to build more cohesive and stable server environments.
UUID Support
VaultUnlocked includes support for Universally Unique Identifiers (UUIDs), thanks to contributions from LlmDl. UUID support is crucial for modern Minecraft servers, as it ensures that player data remains consistent and accurate, even when players change their usernames. This feature enhances the reliability of player identification across various systems within the server, reducing the risk of errors or data loss.
BigDecimal Support
VaultUnlocked introduces BigDecimal support, also contributed by LlmDl. This feature allows for precise and accurate currency calculations, which is essential in servers with complex economies. By using BigDecimal, VaultUnlocked can handle large numbers and fractional values with high precision, ensuring that all financial transactions within the server are accurate and reliable.
License
VaultUnlocked is licensed under the LGPLv3 License. You can find more here.
Configurations/Permissions
Config:
- update-check
- turns the update checker on/off
Permissions:
- vault.admin
- Allows access to vault info, and conversion commands
- Defaults to OP
API/Source
- VaultUnlocked Source: https://github.com/TheNewEconomy/VaultUnlocked
- VaultUnlocked API Source: https://github.com/TheNewEconomy/VaultUnlockedAPI
bStats Collection
VaultUnlocked utilizes bStats to collect various metrics similar to the original Vault plugin. These include:
- A unique identifier
- The server's version of Java
- Whether the server is in offline or online mode
- Plugin's version
- Server's version
- OS version/name and architecture
- core count for the CPU
- number of players online
- Metrics version
- Which Chat, Economy, and Permission hook is currently being used
You may opt out of the bStats metrics collection by editing plugins/bstats/config.yml and changing opt-out to true.
Linking VaultUnlocked For information on implementing VaultUnlocked please refer to: https://github.com/TheNewEconomy/VaultUnlockedAPI
All Versions
+ Add Version| Name | Game version | Platforms | Published | Downloads | Actions |
|---|---|---|---|---|---|
| 21h ago | 1 | ||||
| 21h ago | 1 | ||||
| 21h ago | 1 | ||||
| 21h ago | 1 | ||||
| 21h ago | 1 | ||||
| 21h ago | 1 | ||||
| 21h ago | 1 | ||||
| 21h ago | 1 | ||||
|
R
2.19.1
|
21h ago | 1 | |||
| 21h ago | 1 | ||||
| 21h ago | 1 | ||||
| 21h ago | 1 | ||||
| 21h ago | 1 | ||||
| 21h ago | 1 | ||||
| 21h ago | 1 | ||||
| 21h ago | 1 | ||||
| 21h ago | 1 | ||||
| 21h ago | 1 | ||||
| 21h ago | 1 | ||||
| 21h ago | 1 | ||||
| 21h ago | 1 | ||||
| 21h ago | 1 | ||||
| 21h ago | 1 | ||||
| 21h ago | 1 | ||||
| 21h ago | 1 | ||||
| 21h ago | 1 | ||||
| 21h ago | 1 |
- Added support for 26.3
- Added support for 26.3
- Updated api-version in plugin yaml to be proper
- Added backwards compatibility all the way back to craftbukkit 1.1.
- Updated api-version in plugin yaml to be proper
- Added backwards compatibility all the way back to craftbukkit 1.1.
- Added support for 26.2
- Added support for 26.2
- Added support for 26.1.2
- Split project into VaultUnlocked and VaultUnlockedJava8 for improved compatibility.
- Added provider stats for VaultUnlocked on faststats.
- Added support for VaultUnlockedAPI 2.20.
- Fix issue with PAPI support on legacy economy providers(thanks to UsainSrht)
## VaultUnlockedAPI 2.20 Changes
- Added MultiEconomyResponse to represent multi-account transaction results, including per-account balances, response type, amount, and error details.
- Added transfer support to Economy, including account-to-account transfers with optional world and currency context. Transfers withdraw from the source account, deposit into the target account, and attempt to refund the source account if the deposit fails.
- Added AsyncEconomy, an asynchronous economy API covering account, balance, transaction, transfer, and shared-account operations through CompletableFuture.
- Added Economy#supportsAsync() and Economy#async() to allow providers to advertise and expose asynchronous economy support.
- Added EconomyFutures, a utility wrapper that prefers AsyncEconomy when available and otherwise falls back to completed futures from synchronous Economy calls.
- Added support for 26.1.2
- Split project into VaultUnlocked and VaultUnlockedJava8 for improved compatibility.
- Added provider stats for VaultUnlocked on faststats.
- Added support for VaultUnlockedAPI 2.20.
- Fix issue with PAPI support on legacy economy providers(thanks to UsainSrht)
## VaultUnlockedAPI 2.20 Changes
- Added MultiEconomyResponse to represent multi-account transaction results, including per-account balances, response type, amount, and error details.
- Added transfer support to Economy, including account-to-account transfers with optional world and currency context. Transfers withdraw from the source account, deposit into the target account, and attempt to refund the source account if the deposit fails.
- Added AsyncEconomy, an asynchronous economy API covering account, balance, transaction, transfer, and shared-account operations through CompletableFuture.
- Added Economy#supportsAsync() and Economy#async() to allow providers to advertise and expose asynchronous economy support.
- Added EconomyFutures, a utility wrapper that prefers AsyncEconomy when available and otherwise falls back to completed futures from synchronous Economy calls.
- Added supported for 26.1
- Upgraded java requirement to 17+
added canWithdraw and canDeposit methods to the Economy API.
These allow consumers to check if a withdraw or deposit transaction is possible be performing it, providers may include various checks into this beyond just simply checking the balance.
- Added modern Chat API! Located at: net.milkbowl.vault2.chat.ChatUnlocked
- Added Modern Permission API! Located at: net.milkbowl.vault2.permission.PermissionUnlocked
- Added support for 1.21.11
- Added support for Hytale using VaultUnlocked-Hytale.
- Added support for 1.21.10
- Added clarity to documentation for default behavior if the provider doesn't support share accounts.
- Added clarity to documentation for default behavior if the provider does not support multi-currency.
- Added clarity to documentation for default behavior if the provider doesn't support multiple worlds.
- Deprecated ``
List<String> accountsAccessTo(@NotNull final String pluginName, @NotNull final UUID accountID, @NotNull final AccountPermission... permissions)` - This method will be removed in a future release as the string return allows ambiguity.
- Deprecated `
List<String> accountsMemberOf(@NotNull final String pluginName, @NotNull final UUID accountID)` - This method will be removed in a future release as the string return allows ambiguity.
- Deprecated `
List<String> accountsOwnedBy(@NotNull final String pluginName, @NotNull final UUID accountID)` - This method will be removed in a future release as the string return allows ambiguity.
- Added `
List<UUID> accountsWithAccessTo(@NotNull final String pluginName, @NotNull final UUID accountID, @NotNull final AccountPermission... permissions)` - This method is a replacement for the now deprecated `
List<String> accountsAccessTo(@NotNull final String pluginName, @NotNull final UUID accountID, @NotNull final AccountPermission... permissions)` - Added `
List<UUID> accountsWithMembershipTo(@NotNull final String pluginName, @NotNull final UUID accountID)` - This method is a replacement for the now deprecated `
List<String> accountsMemberOf(@NotNull final String pluginName, @NotNull final UUID accountID)` - Added `
List<UUID> accountsWithOwnerOf(@NotNull final String pluginName, @NotNull final UUID accountID)` - This method is a replacement for the now deprecated `
List<String> accountsOwnedBy(@NotNull final String pluginName, @NotNull final UUID accountID)``
- Supported for 1.21.9
- Fixed issue where the softdepend for PlaceholderAPI was missing causing a console message.
- updated to 1.21.8
- Added a few new methods for grabbing accounts that specific accounts have access to.
java
/**
- Retrieves a list of account IDs owned by the specified account ID.
- @param pluginName the name of the plugin
- @param accountID the unique identifier of the account
- @return a list of account names owned by the specified account ID
- @since 2.14
- /
List<String> accountsOwnedBy(@NotNull final String pluginName, @NotNull final UUID accountID)
/**
- Retrieves a list of account IDs that the specified account is a member of.
- @param pluginName the name of the plugin
- @param accountID the UUID of the account to check membership for
- @return a List of String values representing the accounts that the account is a member of
- @since 2.14
- /
List<String> accountsMemberOf(@NotNull final String pluginName, @NotNull final UUID accountID)
/**
- Retrieves a list of account IDs that the specified account has the specified permissions for.
- @param pluginName the name of the plugin
- @param accountID the UUID of the account to check access for
- @param permissions variable number of permissions to check for
- @return a list of accounts that the account has the specified permissions to
- @since 2.14
- /
List<String> accountsAccessTo(@NotNull final String pluginName, @NotNull final UUID accountID, @NotNull final AccountPermission... permissions)
`
## 📘 VaultUnlocked PlaceholderAPI Placeholders (UUID-Based)
Note: These only work if your economy plugin supports the modern API of VaultUnlocked.
### 💰 Personal Balance (Player Required)
| Placeholder | Description |
|-----------------------------------------------------------------------------|-------------------------------------------------------------------------|
| %vaultunlocked_balance% | Player’s balance in the default world |
| %vaultunlocked_balance_<world>% | Player’s balance in a specific world |
| %vaultunlocked_balance_currency_<currency>% | Balance in a specific currency (default world) |
| %vaultunlocked_balance_currency_<currency>_world_<world>% | Balance in a specific currency and world |
| %vaultunlocked_balanceformatted% | Formatted balance (e.g., $1,234.56) |
| %vaultunlocked_balanceformatted_currency_<currency>% | Formatted balance in a specific currency |
| %vaultunlocked_balanceformatted_currency_<currency>_world_<world>% | Formatted balance in a specific currency and world |
### 🏦 Shared Account Balance (Account UUID Required)
| Placeholder | Description |
|-----------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------|
| %vaultunlocked_account_<uuid>% | Shared account balance (default currency/world) |
| %vaultunlocked_account_<uuid>_status% | Whether the player has access to the shared account |
| %vaultunlocked_account_<uuid>_currency_<currency>% | Shared account balance in a specific currency |
| %vaultunlocked_account_<uuid>_currency_<currency>_world_<world>% | Shared account balance in a specific currency and world |
| %vaultunlocked_account_<uuid>_currency_<currency>_formatted% | Formatted balance in a specific currency |
| %vaultunlocked_account_<uuid>_currency_<currency>_world_<world>_formatted% | Formatted balance in a specific currency and world |
### ✅ Capability Checks (Player & Account UUID Required)
Please note: The response is yes or no, for true or false respectively.
| Placeholder | Description |
|------------------------------------------|----------------------------------------------------------------|
| %vaultunlocked_can_deposit_<uuid>% | Whether the player can deposit into the account with UUID. |
| %vaultunlocked_can_withdraw_<uuid>% | Whether the player can withdraw from the account with UUID. |
| %vaultunlocked_can_balance_<uuid>% | Whether the player can view the balance of the account. |
| %vaultunlocked_can_transfer_<uuid>% | Whether the player can transfer ownership of the account. |
| %vaultunlocked_can_invite_<uuid>% | Whether the player can invite members to the account. |
| %vaultunlocked_can_remove_<uuid>% | Whether the player can remove members from the account. |
| %vaultunlocked_can_modify_<uuid>% | Whether the player can modify member permissions. |
| %vaultunlocked_can_delete_<uuid>% | Whether the player can delete the account. |
### 📂 Account List / Info (Player Required)
| Placeholder | Description |
|-------------------------------------|---------------------------------------------------------|
| %vaultunlocked_accounts% | List of accessible shared account UUIDs |
| %vaultunlocked_accounts_count% | Count of accessible shared accounts |
### 💱 Currency Metadata (No Player Required)
| Placeholder | Description |
|---------------------------------------|-----------------------------------------|
| %vaultunlocked_currency% | Singular form of the default currency |
| %vaultunlocked_currencyplural% | Plural form of the default currency |
### 🔡 Encoding Notes for Currency Names
If a currency contains spaces or symbols, encode them:
| Character | Use % Encoding |
|-----------|------------------|
| Space | %20 |
| $ | %24 |
| + | %2B |
| & | %26 |
| / | %2F |
| = | %3D` |- Added support for 1.21.7
- 1.21.6 support
- Separated command permissions into two separate permissions(thanks to Mickey42302)
- vault.admin and vault.update
- Javadocs are here! https://theneweconomy.github.io/VaultUnlockedAPI/javadoc/
- 1.21.5 support
## API Changes
- Implemented set api methods, which can be used to set the balance for accounts.
java
EconomyResponse set(@NotNull final String pluginName, @NotNull final UUID accountID, @NotNull final BigDecimal amount);
EconomyResponse set(@NotNull final String pluginName, @NotNull final UUID accountID, @NotNull final String worldName, @NotNull final BigDecimal amount);
EconomyResponse set(@NotNull final String pluginName, @NotNull final UUID accountID, @NotNull final String worldName, @NotNull final String currency, @NotNull final BigDecimal amount);
``## API Changes
- Added standards for minimum Vault Unlocked Support. Projects that meet these standards may request
- Added balance methods in same format as the old getBalance methods.
## Deprecations
- Deprecated getBalance methods, these are marked for removal in 3 releases. Use balance methods instead.
- Deprecated createAccount methods without nonPlayer. Use the methods that include the nonPlayer parameter.
- boolean createAccount(final UUID accountID, final String name, final boolean player)
- boolean createAccount(final UUID accountID, final String name, final String worldName, final boolean player)
- Added pluginName string to fractionalDigits, format methods, and getDefaultCurrency methods.
- Added deleteAccount method.
- Removed bank account methods.
- Added new API that allows fine tuned account permissions, individual members, and ownership.
- Added method to check if account is allowed to have a specific currency as part of their balance.
- Disable Paper's Plugin Remapper(Thanks to HSGamer)
- Support for API2 was added to the vault convert command.
- Fixed incompatibility issue with plugins that inherited from the AbstractEconomy class instead of implementing the Economy interface.
