Changelog for v1.5.3
- I added 5 new commands.
- I added support for commands for offline users.
- I fixed a problem with balance not showing correct balance from
/balance <player>
- I added a way to set it to detect physical coins only by material without needing to have customomodeldata
Commands
/beco set <amount> <currencytype> <player>
- with this command you can set a amount of money for a player./beco offline set <amount> <currencytype> <player>
- with this command you can set an amount of money to an offline player./beco offline balance <player> <currencytype>
- with this command you can see the balance from an offline player./beco offline add <player> <amount> <currencytype>
- with this command you can add money to an offline player./beco offline remove <player> <amount> <currencytype>
- with this command you can remove a certain amount of money from an offline player.
Permissions
beconomy.set
beconomy.offline.balance
beconomy.offline.add
beconomy.offline.remove
beconomy.offline.set
Configs
"matchOnlyMaterial": false
-
When this function is set to false
, physical coin detection has been working normally so far.
"matchOnlyMaterial": true
- When this function is set to true
, physical coin detection is done only by material and no longer takes into account custommodeldata/lore/name.
- I fixed the problem with negative money from pay/add.
- I fixed a problem of reconnecting to databases.
- I modified the balance command and now you can configure it just like normal commands in config.json
- I made some changes to the API.
New functions for API:
/**
* Sets the player's balance to a specific amount.
*
* This method should be used instead of directly calling `BEconfig.setBalance(...)`,
* as it also triggers the `onBalanceChanged` event and notifies all registered listeners.
*
* @param playerId The UUID of the player whose balance is being updated.
* @param currencyType The currency type to modify.
* @param newBalance The exact value to set as the new balance.
*/
fun updateBalance(playerId: UUID, currencyType: String, newBalance: BigDecimal)
/**
* Adds a specified amount to the player's balance.
*
* This method updates the balance, triggers the `onBalanceChanged` event,
* and logs the transaction as a credit. Always use this instead of modifying the balance manually.
*
* @param playerId The UUID of the player.
* @param currencyType The currency to increase.
* @param amount The amount to add to the current balance.
*/
fun increaseBalance(playerId: UUID, currencyType: String, amount: BigDecimal)
/**
* Subtracts a specified amount from the player's balance.
*
* This method checks for sufficient funds before subtracting, triggers the `onBalanceChanged` event,
* and logs the transaction as a debit. Returns false if the player has insufficient funds.
*
* @param playerId The UUID of the player.
* @param currencyType The currency to subtract from.
* @param amount The amount to subtract.
* @return True if the subtraction was successful, false otherwise.
*/
fun decreaseBalance(playerId: UUID, currencyType: String, amount: BigDecimal): Boolean
/**
* Forces a balance sync to the player using packets.
*
* This is useful when an external system (like a scoreboard or UI) needs
* to refresh the display without changing the balance.
*
* @param playerId The UUID of the player.
* @param currencyType The currency type to sync.
*/
fun syncBalanceToPlayer(playerId: UUID, currencyType: String)
/**
* Applies a modification to the player's balance using a safe lambda.
* Automatically handles balance update and events.
*
* Example usage:
* modifyBalanceSafely(uuid, "pokedollars") { it.multiply(BigDecimal("1.05")) }
*
* @param playerId The UUID of the player.
* @param currencyType The currency type.
* @param modifier A function that receives the current balance and returns the new one.
*/
fun modifyBalanceSafely(playerId: UUID, currencyType: String, modifier: (BigDecimal) -> BigDecimal)
/**
* Resets a player's balance to the default value defined in config for the currency.
* Triggers the `onBalanceChanged` event.
*
* @param playerId The UUID of the player.
* @param currencyType The currency type to reset.
*/
fun resetBalanceToDefault(playerId: UUID, currencyType: String)
/**
* Retrieves a map of all balances for a specific player across all currencies.
*
* @param playerId The UUID of the player.
* @return Map of currency type to balance.
*/
fun getAllPlayerBalances(playerId: UUID): Map<String, BigDecimal>
/**
* Retrieves the top players based on their balance for a specific currency.
* This works across all storage types (local file or database).
*
* @param currencyType The type of currency to rank by.
* @param limit The maximum number of top players to return.
* @return A list of PlayerBalance objects sorted by balance in descending order.
*/
fun getTopBalances(currencyType: String, limit: Int): List<PlayerBalance>
Small Update
- I modified the balance command, now it's no longer
/beco balance
and/balance
simply, the permission is the same - Fixed the problem with Italic text format in
/beco top
- You can now use placeholders in lore from the head of
/beco top
The placeholders from the mod are the following:
%beco:<currencyName>_name%
- Show the name from the economy.
%beco:<currencyName>_symbol%
- Show the symbol from the economy.
%beco:<currencyName>_balance%
- Show balance sheets from the economy.
%beco:primary_currency%
- Show balance from primary currency.
%beco:player_name%
- Show the player name.
Major update!
The mode is now called BEconomy, the Blanket Dev's community no longer exists!
- For all minecraft servers using this mod, please change the name of the configs folder from
blanketeconomy
tobeconomy
, only if you are using this version or later. - And the permissions as well from:
EX:
blanketeconomy.reload
tobeconomy.reload
- Any database errors, please let me know on discord!
- Support GTS 2.4.2
New Colo Format!
Overview
This update introduces a custom text parser that supports various formatting tags, gradients, colors, click and hover events, and vanilla-style codes. You can combine tags or nest them for powerful text displays.
Features & Examples
-
Bold, Italic, Underline, Strikethrough, Obfuscated
<b>Bold text</b>
<i>Italic text</i>
<u>Underlined text</u>
<strike>Strikethrough text</strike>
<obf>Obfuscated text</obf>
-
Hex Colors
<#FF0000>This text is red</#>
<#00FF00>This text is green</#>
-
Gradient
<gradient:#FF0000:#FFFF00:#00FF00>Hello Gradient!</gradient>
- You can use multiple hex colors separated by “:” (e.g.
#FF0000:#0000FF:#00FF00
). - The parser will blend colors across the text.
-
Click Events
<click:run_command:'/say Hello'>Click to run a command</click>
<click:suggest_command:'/help'>Click to suggest a command in chat</click>
<click:open_url:'https://example.com'>Click to open a website</click>
<click:copy_to_clipboard:'Copied!'>Click to copy text</click>
- Note:
run_command
is executed as if the player typed it in chat, so it requires permissions.
-
Hover Events
<hover:show_text:'Hover message here'>Hover over me</hover>
-
Links
<link:https://google.com>Click to open Google</link>
- Equivalent to a
click:open_url
event.
-
Reset
<reset>
or<r>
resets any formatting to default.
-
Vanilla Formatting Codes
- Use
&
followed by a code (e.g.&a
,&l
,&r
):&l
= bold&o
= italic&n
= underline&m
= strikethrough&k
= obfuscated&r
= reset&0
-&f
= color codes
- Use
🔥New Changes
- added support for auto arguments to commands
- added a way to disable "/beco pay" for certain types of coins in the config.
"transfer": true/false
- added a way to disable "/beco withdraw" for certain types of coins in the config.
"withdraw": true/false
- added support for new types of color format such as:
Gradient
<gradient:#FF0000,#00FF00,#0000FF>Text</gradient>
Links
<link:https://example.com>Link Click Here</link>
Hex Colors
<#FFA500>Text
Data Save Changes
- From now on you can save data from players using databases How would it be:
- MySQL
- MongoDB (in progress)
- PostgreSQL
- Sqlite
EX For:
- MySQL/MongoDB/PostgreSQL
"localSave": true,
"databaseSave": false,
"database": {
"type": "mysql", // here you set which type of database to use the plugin!
"host": "localhost",
"port": 3306,
"databaseName": "economy",
"username": "root",
"password": "password"
}
EX For:
- Sqlite
"localSave": true,
"databaseSave": false,
"database": {
"type": "Sqlite",
"host": null,
"port": null,
"databaseName": "economy.db",
"username": null,
"password": null
}
🔥New Commands
/beco balance <player> Allows admins and authorized users to view another player’s balance. Ideal for monitoring and managing player economies.
/beco top Displays a leaderboard of top player balances, complete with player heads and customizable lore, showing player names, balances, and online status.
🛠️ Placeholder API Integration
BlanketEconomy now includes a range of placeholders for integration with other plugins, providing dynamic balance, currency, and player information. Here’s a complete list of available placeholders:
%blanketeconomy:player_name%
Displays the player’s name.
%blanketeconomy:uuid%
Displays the player’s UUID.
%blanketeconomy:balance_<currencyType>%
Shows the balance of the player in the specified currency.
%blanketeconomy:primary_currency%
Displays the server’s primary currency type.
%blanketeconomy:currency_symbol_<currencyType>%
Shows the symbol for a specified currency.
%blanketeconomy:total_balance%
Displays the total balance of the player across all currencies.
%blanketeconomy:last_transaction%
Shows the amount of the last transaction made by the player.
%blanketeconomy:online_players%
Displays the current number of online players.
%blanketeconomy:max_players%
Shows the maximum player count for the server.
Additionally, for each custom currency configured on your server (e.g., "Gold Coin" or "Cobble Coin"), there are specific placeholders available:
%blanketeconomy:<currencyName>_balance%
Displays the player’s balance in the specified currency.
%blanketeconomy:<currencyName>_symbol%
Shows the symbol of the specified currency.
%blanketeconomy:<currencyName>_name%
Displays the name of the specified currency.
Replace <currencyType> and <currencyName> with the specific currency or formatted name as configured in your setup.
⚙️ New Permissions
To control access to these features, we’ve added new permissions:
- Allows players to view their own balance with the /beco balance command.
blanketeconomy.balance
- Allows players to view other players' balances with the /beco balance <player> command.
blanketeconomy.balance.others
- Grants access to view the top balances with the /beco top command.
blanketeconomy.top
- remove Minimesage Format (will be added in the future)
- added Minecraft Color Format "&x"
- fixed issue with commands on non-hybrid fabric servers no works. (.. Minimesage) There is a small bug with loading the file the first time you install the mod, you just have to restart the server after it gives you the error that it did not find the config. It will be solved in the next update!!
- I added a new color format to make more customization to the currency and messages!
- Format: MiniMessage