Gringotts
Gringotts: Item based currency.
Gringotts is an item-based economy (currency) plugin for the Bukkit Minecraft server platform. Unlike earlier economy plugins, all currency value and money transactions are based on actual items in Minecraft, per default emeralds. The goals are to add a greater level of immersion, a generally more Minecraft-like feeling, and in the case of a PvP environment, making the currency itself vulnerable to raiding.
Gringotts was originally created for the Minecraft Wars PvP/survival server.
Features
- Item-backed economy (configurable, default emeralds)
- multiple denominations with automatic conversion (for example, use emeralds and emerald blocks)
- Storage of currency in chests and other containers, player inventory and ender chests (configurable)
- direct account-to-account transfers commands
- optional transaction taxes
- fractional currency values (fixed decimal digits)
- Account support for Factions, Towny and WorldGuard
- Vault integration
Latest changes
To get notified of new versions, please subscribe to file updates.
v2.9
- DEPENDS ON JAVA 8. If your server is not on Java 8 yet, you should upgrade, or ask your service provider to upgrade. Java 7 isn't supported anymore by Oracle.
- Should now work both in regular as well as async context. This means there should be no more "Asynchronous entity world add" errors anymore, and Gringotts is now compatible with Towny in async mode, as well as other plugins that call economy methods asynchronously.
- The maximum virtual money allowed for an account is now equal to the lowest denomination, instead of the highest. I changed this because that behavior was causing lots of confusion.
- fixed other minor bugs
v2.8
- built for Minecraft 1.9 and Factions 2.8. May not be compatible with older Factions versions!
- unsupported versions of Factions should be handled more gracefully now.
- updated to current version of Metrics-Lite. Fixes annoying error messages.
v2.7
- Named denominations: Each denomination can now have its own name, which will be shown in /balance messages and the like. To activate this feature, use the
named-denominations
config setting. By default this will use the denomination's displayname or regular item name, but you can define a custom name as well. See configuration instructions for details. - Balance messages can now be configured to show only regular balance or also vault/inventory balances.
- Now also supports
&
prefix to color codes in messages and item displayname/lore in addition to the defaultยง
prefix. - can now also used Vault-supported item names in denomination config, not only regular Bukkit names. This can make the config a bit more intuitive. (requires Vault)
- lore config for denomination items now also allows a simple string instead of a string list.
- configuration should now always be loaded as UTF8.
- fixed an issue with
/money
commands failing on some servers.
v2.6
- adds display name and lore support for currency items. See configuration instructions on how to configure this. Note you will need a third-party plugin to rename items not created by Gringotts. Thanks to dj5566 for contributing this feature!
startingbalance
config option works again
Planned Features
See: Gringotts open enhancement issues on GitHub. You're welcome to vote on enhancements important to you, but I might not have the time to implement them.
Instructions
Wiki
Check out the Gringotts Wiki for more hints and a troubleshooting guide.
Installation and Configuration
Download Gringotts and place it in your craftbukkit/plugins folder.
Please see the Configuration and Permissions document on how to configure Gringotts.
Usage
For full information on configuration and usage in Gringotts v2.x, please see the configuration page and the usage page respectively.
Storing money in an account requires a Gringotts vault. A vault consists of a container, which can be either chest, dispenser or furnace, and a sign above declaring it as a vault. A player or faction may claim any number of vaults. Vaults are not protected from access through other players. If you would like them to be, you may use additional plugins such as LWC or WorldGuard.
Player vaults
Place a sign above a container block, with [vault]
written on the first line. If it was created correctly, the sign will display your name on the third line and you will receive a message that the vault has been created.
Faction vaults
Place a sign above a container block, with [faction vault]
written on the first line. If it was created correctly, the sign will display your faction's tag on the third line and you will receive a message that the vault has been created.
Towny vaults
- To make a vault for your town: place a sign above a container block, with
[town vault]
written on the first line. - To make a vault for your nation: place a sign above a container block, with
[nation vault]
written on the first line. If it was created correctly, the sign will display your town's or nation's tag on the third line and you will receive a message that the vault has been created.
User commands
/money
Display your account's current balance.
/money pay <amount> <player>
Pay an amount to a player. The transaction will only succeed if your account has at least the given amount plus any taxes that apply, and the receiving account has enough capacity for the amount.
/money withdraw <amount>
/money deposit <amount>
Withdraw an amount from vault storage into inventory, or deposit from inventory to a vault.
Admin commands
/moneyadmin b <account>
Get the balance of a player's account.
/moneyadmin add <amount> <account>
Add an amount of money to a player's account.
/moneyadmin rm <amount>
Remove an amount of money from a player's account.
/gringotts reload
Reload Gringotts config.yml and apply any changed settings.
Need Help?
- First, check the Wiki.
- For support requests, feature requests and bug reports, please open a ticket.
- Drop by the Gitter channel and talk to me (jastice), and I will drop by.
- When your issue is resolved, update the wiki troubleshooting page!
Also, follow me on twitter: @ebenwert
Source and Continuous Integration
Gringotts is open source. View, fork and edit on Github
CI Status: Current Development builds Automatic Release builds
CI Builds have not been review by BukkitDev staff. Install at your own risk, just like anything else from the internet.
@firelook
I don't think that's within the scope of this plugin.
May I do suggestions: - to remunerate user accounts with nation account for:
everything should be parameters (how much, every x day, every y hours, this amount,...)
@roblabla
Absolutely!
@firelook
Hey eben, may I submit a PR to see if I can implement this myself ?
And also, I just kind of fixed towny. https:github.com/roblabla/Towny/blob/patch-1/src/com/palmergames/bukkit/towny/object/TownyEconomyObject.java#L94
I sent it as a PR. It's all up to them now. I tested it on my server and it works wonderfully.
@firelook
Do you mean account balance? Something like this is planned, but not for anytime soon. I'll also consider the account transaction log.
is their a possibility on the last line of the sign to have a sold of the account ? in the sameway to have a log of all transaction happening on our bank account (every day, week, month) ?
@HerrGrim
Hi, thanks! There is no command for showing capacity, because with multiple denominations, it is not really possible to give a single number for capacity. The best I could (with reasonable effort) do is give a maximum capacity. Even then, transfers of smaller amounts may fail. Since this can be confusing to users I am hesitant to add it.
Hi, and thanks for a great plugin.
One of the players on my server was wondering if there was a command to see the capacity of ones vaults, and if not, if this is possible to add this in the future?
@MistPhizzle
Technically, Gringotts is using an SQL system already (Apache Derby), and it is contained in the plugins/Gringotts/GringottsDB folder. However, this is locked while the server is running. Also, due to the nature of Gringotts, most of the actual money is stored in-game, so only accessing the DB is of limited use.
What you could do is make a simple plugin that accesses all the player's accounts every so often and writes their data into a different DB.
That said, I am currently working on replacing the storage backend to work with the Bukkit provided DB, which you are able to replace in the config.
Would it be possible to have an SQL storage system? So I could make a stats page displaying the top ranked users, etc?
@firelook
The simplest method is putting money items in a town/nation vault that you created, or using the /town deposit command.
As an admin you can also use, for example
How to know (or / and),add money to a town account or a nation account as a "normal user or an admin account ?
@roblabla
Great! Here's the relevant bit of the factions implementation for reference:
https://github.com/MassiveCraft/Factions/blob/04d808e54d0788839c6100c3e6325e7625c382d5/src/com/massivecraft/factions/integration/Econ.java#L145
@ebenwert
Alright. I'll look at their code to see if I can do anything about it myself and submit a PR to them. Thanks for the help and good luck !
@roblabla
Unfortunately, that's a bug in Towny, due to it ignoring the return value from Vault on transaction success. I've already submitted fixes for Factions and Chestshop, I'll probably do one for Towny one of these days.. Until then, perhaps you can disable the /t deposit command to avoid the issue.
I suggest using the issue tracker on Github.
@roblabla
Oh and another bug report : When someone does /t deposit (we use towny) and tries to deposit a greater amount of money than the town chests can hold, the money will disapear from the player inventory, but it will not appear in the town money/chests (since it's overflowing). I even heard some of the players of my server say the whole money from their townchest vanished (though I haven't been able to reproduce this case myself). I suppose it is a problem with Vault/towny integration.
Oh, and where is the best place to report bugs ? :P
@roblabla
Thanks a lot! And yes, that was pretty much the problem. I hadn't tested well enough :)
Great, newest version works ! And let me guess, you forgot to add if the first line of the sign is &l[vault] (instead of the old normal [vault]) ? :)
Anyway, I'm using this occasion to say good work on this plugin, it truely is the best physical economy plugin around.
@roblabla
Sorry again, v1.5.1 had some more problems. Here's v1.5.1a: http://dev.bukkit.org/server-mods/gringotts/files/19-gringotts-v1-5-1a/