The Piggy Bank icon

The Piggy Bank -----

a simple custom item based economy



The Piggy Bank 2.5

Overview:
The Piggy Bank provides a simple item based economy compatible with Vault in Spigot. Players balances consist of both a bank balance and physical items on-hand. The currency item can be customized in the config.

Benefits:
  • Easy to use and very little configuration
  • Pay for items with the currency you have in your bank and if not enough pay with the physical currency item on your person.
Features:
  • Customizable currency items (example provided).
  • Support for Custom Items by with unique display name, lore, enchantments, damage values, unbreakable flag, and custom model data.
  • Players can deposit currency on-hand into their bank account.
  • Players can withdraw currency from their bank account to their inventory.
  • Example defines custom items for Stone Coin, Iron Coin, Copper Coin and Gold Coin.
  • Example includes custom resource pack for coin textures!
  • Admins can add, remove or set bank balances for players.
  • Vault compatible for online and offline transactions.
  • Support for Towny and Factions!
  • Stores bank balances directly in persistent player data
  • PlaceholderAPI integration for %piggybank_balance%, %piggybank_in_bank%, and %piggybank_on_hand%.
Notes:
The default configuration file will install two example resource packs (CoinPack, RubyPack) into the plugins folder with support for custom skinned currency items . In order to automatically provide these packs to your clients from a server you will need to host them on a web site and update the server.properties file with the URL information (resource-pack, resource-pack-sha1 and resource-pack-prompt). Please refer to online guides to set this up properly if you plan to have custom skinned currency items.

Commands:
/bank - check your balance
/bank balance - check your balance
/bank deposit - deposit currency in hand
/bank deposit all - deposit all currency in inventory
/bank exchange - exchange currency in hand with consolidated currency
/bank withdraw <amount> - withdraw amount of currency
/bank withdraw all - withdraw all your currency
/bank transfer <player> <amount> - transfer to player amount of currency
/bank add <player> <amount> - add amount of currency to player balance
/bank remove <player> <amount> - remove amount of currency from player balance
/bank set <player> <amount> - set player's balance
/bank baltop - list the top bank balances
/bank balance <player> - get a player's balance
/piggybank reload - reloads the configuration
/balance <player> - get a player's balance
/baltop - list the top bank balances
/deposit - deposit currency in hand
/deposit all - deposit all currency in inventory
/exchange - exchange currency in hand with consolidated currency
/pay <player> <amount> - pay an amount of currency to a player
/withdraw <amount> - withdraw amount of currency
/withdraw all - withdraw all your currency

Permissions:

piggybank.balance - enables using the bank balance command (default: true)
piggybank.deposit - enables using the bank deposit command (default: true)
piggybank.exchange - enables using the bank exchange command (default: true)
piggybank.withdraw - enables using the bank withdraw command (default: true)
piggybank.transfer - enables using the bank transfer command (default: true)
piggybank.pay - enables using the bank transfer or bank pay command (default: true)
piggybank.add - enables using the bank add command (default: op)
piggybank.remove - enables using the bank remove command (default: op)
piggybank.set - enables using the bank set command (default: op)
piggybank.baltop - enables using the bank baltop command (default: op)
piggybank.balance.others - enables using the bank balance <player> command (default: op)
piggybank.reload - enables using the bank reload command (default: op)

Configuration:
Code (Text):

#
# The Piggy Bank
#
locale: en_us
# change decimal_format to #,##0.00
# if using currencies with decimal values
decimal_format: '#,##0'
allow_item_use: false
balance_maximum: 0
withdraw_maximum: 186624
fake_accounts: true
resource_pack: true
sql:
  enabled: false
  driver: mysql
  host: 127.0.0.1
  port: 3306
  database: piggybank
  use-ssl: true
  username: piggybank
  password: piggybank
configVersion: 7
currency:
  stone_coin:
    item: minecraft:dead_bush
    name: '&7Stone Coin'
    lore:
    - '&r&fThis coin is worth &e1x &fthe 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
  wooden_coin:
    item: minecraft:dead_bush
    name: '&cCopper Coin'
    lore:
    - '&r&fThis coin is worth &e5x &fthe base currency'
    - '&r&9Earn more coins from jobs, quests or trading!'
    enchantments:
    - unbreaking: 10
    - knockback: 0
    damage: 0
    unbreakable: true
    custom_model_data: 2
    flags:
    - HIDE_ATTRIBUTES
    - HIDE_DESTROYS
    - HIDE_ENCHANTS
    - HIDE_PLACED_ON
    - HIDE_POTION_EFFECTS
    - HIDE_UNBREAKABLE
    value: 5.0
  iron_coin:
    item: minecraft:dead_bush
    name: '&fIron Coin'
    lore:
    - '&r&fThis is worth &e10x &fthe base currency'
    - '&r&9Earn more coins from jobs, quests or trading!'
    enchantments:
    - unbreaking: 10
    - knockback: 0
    damage: 0
    unbreakable: true
    custom_model_data: 3
    flags:
    - HIDE_ATTRIBUTES
    - HIDE_DESTROYS
    - HIDE_ENCHANTS
    - HIDE_PLACED_ON
    - HIDE_POTION_EFFECTS
    - HIDE_UNBREAKABLE
    value: 10.0
  gold_coin:
    item: minecraft:dead_bush
    name: '&eGold Coin'
    lore:
    - '&r&fThis is worth &e25x &fthe base currency'
    - '&r&9Earn more coins from jobs, quests or trading!'
    enchantments:
    - unbreaking: 10
    - knockback: 0
    damage: 0
    unbreakable: true
    custom_model_data: 4
    flags:
    - HIDE_ATTRIBUTES
    - HIDE_DESTROYS
    - HIDE_ENCHANTS
    - HIDE_PLACED_ON
    - HIDE_POTION_EFFECTS
    - HIDE_UNBREAKABLE
    value: 100.0
 

Known Issues:
Players that do /withdraw all on a large bank balance might cause lag.

Terms of Service:
The plugin is provided AS-IS.

Disclaimer:
This plugin currently only supports versions 1.20.4.

[​IMG]
It takes a lot of tasty coffee to keep cranking out quality code.
Please donate if you like my plugins...
Resource Information
Author:
----------
Total Downloads: 5,966
First Release: Jan 6, 2020
Last Update: Dec 18, 2023
Category: ---------------
All-Time Rating:
31 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings