The Piggy Bank 1.2.7

a simple custom item based economy

  1. klugemonkey
    Native Minecraft Version:
    1.14
    Tested Minecraft Versions:
    • 1.14
    • 1.15
    The Piggy Bank 1.2.7

    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 Wooden Coin, Stone Coin, Iron 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%.
    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
    /bank 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:
      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
      stone_coin:
        item: minecraft:dead_bush
        name: '&7Stone Coin'
        lore:
        - '&r&fThis coin is worth &e2x &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: 2.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: 25.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.14+. It uses NMS methods so features will break if used with other versions of Minecraft than intended.

    [​IMG]
    It takes a lot of tasty coffee to keep cranking out quality code.
    Please donate if you like my plugins...
    GabyTM likes this.

Recent Reviews

  1. NickJackob
    NickJackob
    3/5,
    Version: 1.2.7
    I love this Idea, but i have a prioblem.

    I have a 1.15.2 Paper Spigot server, but when i try to use "deposit" command, the chat show me "You are not holding any coin".
  2. TheCaptain_420
    TheCaptain_420
    5/5,
    Version: 1.2.2
    Great Support for one config problem I had and plugin serves our exact needs for an item-based in game obtainable economy to allow us to use economy based plugins
  3. mikescraft
    mikescraft
    5/5,
    Version: 1.2.1
    By far the best item based economy plugin. Very easy to use config.
    I think its a little underrated give it a go i am using it on my server and its working wonders specially with the placeholderapi support.
  4. ChernyyKap
    ChernyyKap
    5/5,
    Version: 1.1.7
    Do exactly what I wanted ! :)
    I could be great to see a feature to rename the currency in the future haha
    1. klugemonkey
      Author's Response
      Item is defined in config.yml, name of currency in the en_us.json file.