Economy - Gold Purse

Discussion in 'Plugin Requests' started by roracle, Jun 16, 2021.

Thread Status:
Not open for further replies.
  1. Offline


    Plugin category:


    Minecraft version:

    Suggested name:
    Gold Purse

    What I want:
    An economy plugin that uses raw gold as the currency.

    Now that Gold Ore drops Raw Gold, and nothing else drops it, it only makes sense for Raw Gold to be the currency standard for players, which will lower the overhead of a gold-based economy plugin or system by removing the need for fixes and workarounds for gold farms. But we also have raw iron and raw copper as well, so those could also be used! Heck, any item should be able to be used as currency!

    It should be Vault compatible so any shop plugins can use the system.

    Virtual purses should be available for Towny and other such plugins that require a non-player to hold a value of money.

    Any withdrawn value must have room in the inventory

    There would be an interface for the player purse, as seen below.


    A: Note
    (hovering over will display "Create Note")

    --- Click the icon.
    --- Message in chat: "How much would you like to note?"
    --- Player types in chat the amount to note.
    --- Get a paper item with info on the note value.
    --- Right-click note to deposit into the purse.

    B: Deposit
    (hovering over will display "Deposit")

    --- Click the icon.
    --- Currency items are calculated to the numerical value.
    --- Numerical value is added to the current value of the purse.
    --- Currency items are removed from inventory.

    C: Balance
    (hovering over will display "Balance: #")

    --- Hover over the icon to see the current value of your purse.
    --- The value will be formatted as customized in settings.

    D: Withdraw*
    (hovering over will display "Withdraw")

    --- Click the icon.
    --- Message in chat: "How much would you like to withdraw?"
    --- Player types in chat how much to withdraw.
    --- Value typed in is translated into currency items.
    --- Value typed is removed from the purse.

    E: Pay
    (hovering over will display "Pay Player")

    --- Click the icon.
    --- Message in chat: "How much would you like to pay?"
    --- Player types the amount to pay.
    --- Message in chat: "Right-click a player or type their name to send them the gold."
    --- Player right-clicks another player or types the name of another player.
    --- The player identified in chat or by right-click gets that amount deposited into their purse.

    *before a withdrawal is completed, the inventory space necessary should be calculated before withdrawing. If there is not enough room the player gets a message saying "You do not have room to hold this much." displays and the withdrawal is canceled with no changes to the purse value.

    Commands & Permissions:
    /purse (right click with raw gold or raw gold block) - open purse interface.
    /money, /balance, /purse balance - show purse balance in chat

    /purse give playername # - adds to a purse
    /purse take playername # - removes from a purse
    /purse set playername # - sets a purse value
    /purse create virtualname - creates a virtual purse**

    **virtual purses have no interface and are ONLY a value.

    // Example settings

    // First set the value of the items.
    // Value of an item cannot go below 0.01
    raw_iron: 1
    raw_iron_block: 9
    raw_copper: 2
    raw_gold: 5
    raw_gold_block: 45

    // Use a currency symbol?
    use-symbol: true
    // Set a symbol for the currency.
    symbol: $
    // Set location of the currency symbol. If "false" the symbol appears on the right.
    left: true

    // Should a currency keyword be used?
    // If true, the keyword will appear at the end of the value.
    // If false, only the symbol will be used.
    // Examples of keywords: GP, Gil, Rupees
    use-keyword: false
    keyword: GP

    // Should inventory items be traded/noted before accessing the purse?
    // Default is false. Turning this to "true" will take the money
    // from your inventory before taking it from the purse.
    // When false, items in the inventory are NOT counted
    // when making transactions, they must be deposited into the purse.
    trade-inventory: false

    // MySQL, mariaDB, flatfile, etc should be options for backing up the player's money data.
    savetype: flatfile
    (database settings below this)

    This should be open source and available to everyone. This way, it can be updated, and built upon.
    What I've put in this plugin suggestion is a very bare minimum of what would be required for a plugin like this.
    This is NOT the same as Gringotts, as the player vaults were cumbersome and wasteful for player space. Perhaps a similar thing could be added in the future, but this physical/virtual hybrid solution is likely the best way to approach this.

    Edit: 6/24/2021
    Changed the example settings to be more accommodating for other currencies. Make any item worth any value, thus having complete control over the money system your server uses. Also updated a few other things to reflect the idea of multiple items as currency.
    Last edited: Jun 24, 2021
  2. Offline


    This sounds interesting to make, I might try making it. However I've never used a Database in a plugin
    Last edited: Jun 17, 2021
  3. Offline


    There's always a first time for everything. :)
    I believe in you!
    ErynLasbelin likes this.
Thread Status:
Not open for further replies.

Share This Page