The Piggy Bank icon

The Piggy Bank -----

a simple custom item based economy




This release provides support for Spigot 1.20.4.

Changed config.yml to include string_overrides for currency names (can still use localized names in the json files).
Updated CoinPack sample resource pack to version 22, removed wooden_coin and added copper_coin in example.
----------, Dec 18, 2023

This version specifically supports Spigot 1.20.2.
----------, Oct 24, 2023

This release supports Spigot 1.20.1.
----------, Jun 29, 2023

This release is for 1.19.4.
----------, May 8, 2023

Re-released ordering
----------, May 5, 2022

Re-released
----------, May 5, 2022

Fixes broken build of 1.17 version (missing shaded jnbt)
----------, May 5, 2022

This version supports both 1.18.1 and 1.18.2
----------, Mar 31, 2022

This version specifically supports Spigot version 1.18.2.
----------, Mar 17, 2022

This 2.0 release specifically support Spigot 1.17.1+. Please continue to use the 1.3.5 version for Spigot 1.14-1.16.5.
----------, Aug 10, 2021

This 1.3.5 version fixes a bug in the localization text for a missing translation.
----------, Aug 9, 2021

This release fixes two missing translations and adds support for written_book meta.

- Removed locale string command.add
- Added locale string parameter.add
- Added locale string parameter.amount
- Updated locale version to 13
- Added some configuration type checks for parsing currency items
- Added support for generation, title, author and pages meta if currency item is of item: minecraft:written_book

generation should be one of the following: 'COPY_OF_COPY', 'COPY_OF_ORIGINAL', 'ORIGINAL', or 'TATTERED'.
title is a string where spaces are replaced with _.
author is a string.
pages is a list of strings.

For example:

Code (Text):
currency:
  written_book:
    item: minecraft:written_book
    name: '&5Book of Stone'
    lore:
    - '&r&fThis book is the standard base currency'
    - '&r&9Earn more books from quests or trading!'
    generation: 'TATTERED'
    title: '&5Book_of_Stone'
    author: 'SpawnChunk'
    pages:
    - '&r&0This book is the standard base currency'
    - '&r&9Earn more books from quests or trading!'
    unbreakable: true
    flags:
    - HIDE_ATTRIBUTES
    - HIDE_DESTROYS
    - HIDE_ENCHANTS
    - HIDE_PLACED_ON
    - HIDE_POTION_EFFECTS
    - HIDE_UNBREAKABLE
    value: 1.0
This version will update your en_us.json locale file. Please make the appropriate changes to any customized locale files by adding the following...

"parameter.amount": "amount",
"parameter.all": "all"
----------, Nov 22, 2020

This release adds support for 1.16.4+ and should be future safe unless something significantly changes in the API.
----------, Nov 4, 2020

Fixes issue with /piggybank reload command.
----------, Sep 24, 2020

This release fixes an issue with tab completion.
----------, Sep 4, 2020

This release adds support for 1.16.2.

This also updates example resource files for resource pack version 6 on 1.16.2.

This release updates the localization strings to provide more consistent color formatting. No keys have changed, but if you have localized strings, you may need to update.
----------, Aug 31, 2020

Updated to JNBT 1.9 to fix console exception issue.
Added preliminary support for MVdWPlaceholderAPI.
----------, Jul 10, 2020

Removed formatting for placeholders.
----------, Jul 4, 2020

This version is a Beta Release. Please do not install on a production server before testing and understanding the risks.
As always, please make a backup of your data before installing.

This version adds support for 1.16.1.
----------, Jun 26, 2020

This version is a Beta Release. Please do not install on a production server before testing and understanding the risks.
As always, please make a backup of your data before installing.

This version adds support for 1.16.1.
----------, Jun 26, 2020

This version is a Beta Release. Please do not install on a production server before testing and understanding the risks.
As always, please make a backup of your data before installing.

This version adds support for 1.16.1.
----------, Jun 26, 2020

This version is a Beta Release. Please do not install on a production server before testing and understanding the risks.
As always, please make a backup of your data before installing.

This version adds support for 1.16.1.
----------, Jun 26, 2020

This version is a Beta Release. Please do not install on a production server before testing and understanding the risks.
As always, please make a backup of your data before installing.

This version adds support for 1.16.1.
----------, Jun 26, 2020

This version is a Beta Release. Please do not install on a production server before testing and understanding the risks.
As always, please make a backup of your data before installing.

This version adds support for 1.16.1.
----------, Jun 26, 2020

This release fixes an issue in how amounts are calculated that could result in withdrawing or depositing resulting in no change in balance.

It fixes how currency amounts which are stored as a double are compared to defined currency amounts which might result in an inaccurate comparison due to precision errors affecting behavior.

This release also adds enchantments to the config.yml for currency items as well as the ability to set item flags on each currency item to control how these items are displayed in inventories.

An example is as follows:

Code (Text):
currency:
  wooden_coin:
    item: minecraft:dead_bush
    name: '&6Wooden Coin'
    lore:
    - '&r&fThis coin is the standard base currency'
    - '&r&9Earn more coins from jobs, quests or trading!'
    enchantments:
    - unbreaking: 10
    - knockback: 0
    damage: 0
    unbreakable: true
    custom_model_data: 1
    flags:
    - HIDE_ATTRIBUTES
    - HIDE_DESTROYS
    - HIDE_ENCHANTS
    - HIDE_PLACED_ON
    - HIDE_POTION_EFFECTS
    - HIDE_UNBREAKABLE
    value: 1.0
----------, Feb 22, 2020

This release adds mySQL support in order to allow multi-server support. You can enable in the config.yml as well as setup the database and authentication settings.

Note: switching between persistent data storage and mySQL does not convert data from one format to the next. Balances may be zero if the backend is used for the first time.

This release also defaults to using the minecraft:dead_bush instead of the minecraft: poisonous_potato for the example in order to prevent eating currency.

Addition support for optionally disabling use of currency items was added in the config.yml.
----------, Feb 14, 2020

This release implements support for currency values that are less than 1 and greater than 0.

This is not normally necessary in an item based economy where the base value is always 1, but the capability is implemented nonetheless.

Currency amounts could be fractional if the base item could be comprised with smaller items. For example, if your currency is called leather, your base item of leather would have a value of . But you might setup a currency item for rabbit hide that is 1/4 of the value if leather, matching the recipe. In this case, the value of rabbit hide could be 0.25.

You would also need to setup the decimal_format in the config.yml to allow decimal display of the currency amount, however you could have a balance of 2.5 leathers. In this case, 0.5 leathers is represented by 2 rabbit hides.

Note: While this works well for currencies with a base of 1 and items that are fractional of that base, it should be noted that currency items with decimal values that repeat when added together would not exactly match amounts precisely.

For example, if you have a gold ingot with a base value of 1, and decide that gold nugget should have a value of 0.11111111, then when you add up 9x of these nuggets, the value would be 0.99999999, resulting in a precision error of 0.00000001. When Piggy Bank is determining if a currency item is a multiple of the amount being considered, it will check if the error is within bounds of 0.0001 to -0.0001, however there will still be precision issues in the balances if you decide to use these repeating values.

This release also adds the commands /bank exchange and /exchange that will take any currency on-hand and consolidate it. This may be useful if the player does several withdrawals or physically receives coins from loot and may want to consolidate into higher currency denominations.
----------, Feb 9, 2020

Fixed an issue where paying/transferring an amount to another player would not consider coins in inventory.
----------, Feb 6, 2020

This release fixes an issue where the entire balance of both in-hand and in-bank was used instead of just the in-bank balance when using /withdraw all.

This release fixes an issue where the locale might not be properly used for setting the default group and decimal separators for numbers.

This release fixes an issue where the
message.help.bank_deposit message was not displaying the currency name. It now uses the "currency" in the text.

This release fixes an issue where localization strings that have populated values might not reset formatting changes and cause color formatting or boldness to run beyond the populated component.
----------, Feb 6, 2020


This release fixes the reported issue of the config.yml adding the default currencies when restarted, and with a custom currency without a custom model data storing one with a zero value. The latter would make it impossible to use regular items as a currency since a currency item with a custom model data of zero would not match a regular item without any custom model data.
----------, Jan 30, 2020

This release adds support for multiple customizable currency items. The intent of adding this support was support use cases where multiple items represent the same kind of currency, or different sizes of a currency and are represented with vanilla minecraft items or customized items.

In the other *bank plugins, there is support for specific currency types like iron, gold, emeralds and diamonds. These work well since you have increments of a single currency type. However, combining all of those types into a single plugin is not the intention of this plugin. It is possible, however because the concept is an item based economy, and since Vault only supports a single currency name, there is no practical naming convention that works.

This is because the name of the currency needs to be the name of the base currency. If you make iron nuggets the base currency then all other items are named that way. 10 gold nuggets would be referred to as 100 iron if you used a 10x value to the base currency, and that really doesn't make much sense.

However, there are cases where you want to use multiple custom currency items that are all similar in nature. You can certainly use this to create the same functionality as each of the other plugins.

You can also use for other item groups like hides (rabbit hide, leather), food (carrot, potato, beetroot, bread, etc.), maybe even heads (skull, zombie_head, player_head, etc.). You can use your imagination here.

But the real benefit of this plugin is to support custom currency items, and the default config.yml reflects that in the example configuration by defining custom items.

The way it works is that an item in Minecraft, in this case the poisonous potato, is given a CustomModelData tag that identifies it as something different than the normal poisonous potato. A resource pack is then used to display a different texture for that item.

The example sets up 4 custom items: wooden_coin, stone_coin, iron_coin and gold_coin. The wooden_coin is the base currency and represents a value of 1. All other coins are multiples of that base value.

The example also includes a resource pack that will provide textures for those custom items. You can disable the generation of the resource pack with a flag in the config.yml file. It just creates the file under the plugin's folder, it doesn't install it in any way.

If these settings are not to your liking, then custom items can be defined in the config.yml based on material type, display name, lore, enchantments, durability, unbreaking, and custom_model_data. This should support most implementations of custom item data.

If you have any questions, please post in the discussion forum.
----------, Jan 28, 2020

This release fixes an entry in the locale file that was overlooked when I updated and resulted in a value not being populated for
the warning.bank.was_set key.

This release also adds the name, lore and enchantments keys to the currency section of the config.yml in order to define a custom currency item with these attributes. The default config.yml was updated with an example.

Note: If you define a custom currency using any of the attributes other than the item type, players may not be able to obtain this item in-game unless you provide it to them. You can always use the /bank set <player> <amount> command to change the player's balance to begin, then they could withdraw the physical item from their bank. You could also use commands in crates or job rewards to give currency.
----------, Jan 18, 2020

This release fixes some issues with population of translations in the locale file and adds some command aliases.

Locale Fixes

This release fixes a couple of messages that were not properly populated with the values as specified in the locale file. It also removes a few values from being displayed in some locale strings for clarity. Finally, entries in the locale file for command usage was added to allow for translation.

If you are using a customized or modified locale file, you will need to incorporate the changes in your modified or translated json file.

The new locale file version is 7.

Aliases

This release implements aliased commands for /balance, /baltop, /pay, /deposit and /withdraw. These commands map to their /bank equivalents.

Please note, these commands are not translatable like the sub-command in /bank. The sub-command in /bank can still be translated in the locale file, but will not effect these commands. This is the design of Spigot.

If you would like to localize commands for these or the bank commands, it's recommended to handle this with Spigot's commands.yml, or with a 3rd party alias plugin like BoosCooldowns.
----------, Jan 17, 2020

Fixes the permissions issue. Permissions should properly use the piggybank.* defined permissions now.
----------, Jan 13, 2020

This release fixes a bug where an exception was thrown when the PlaceholderAPI plugin was not installed.

This release also changes where the localized strings for the currency are located. Before they were located in the config.yml, now they are in the localization files.

If you have a custom localization file, you will need to incorporate these changes.

This release also changes the permissions names to be plugin specific. Permissions starting with bank will now start with piggybank.
----------, Jan 13, 2020

Fixes a dependency check for PlaceholderAPI
----------, Jan 10, 2020

This release fixes some issues in the message handling for commands to provide better feedback when a player is not online, as well as when an amount is not parsed correctly.

It also changes the behaviour for the VaultAPI and fake account storage to better support Towny and to add Factions support. There is a new config.yml setting to disable this fake account support that allows non-player bank accounts such as a town bank account, or a factions bank account.

Finally, additional debug output was added for when the debug: true setting is set in the config.yml for every VaultAPI operation, in order to see exactly what is going on for compatibility reasons.

The config.yml and en_us.json files have both been revisioned with changes.
----------, Jan 7, 2020

Resource Information
Author:
----------
Total Downloads: 5,970
First Release: Jan 6, 2020
Last Update: Dec 18, 2023
Category: ---------------
All-Time Rating:
31 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings