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.
@roblabla
Hi, sorry about that! I'm investigating the issue. For now, please try downgrading to 1.4.2 or 1.4.1b and let me know if that works.
Hello, We have a problem on our server, everybody lost their vaults after updating from 1.3.2 to 1.5 ! Whenever someone tries to make a vault, it will pop out on the first transaction/balance check, and it will say
in the console. What should I do ?
@ebenwert
Ah, yeah, right .. I wanted to disable this anyway :D:D
Great plugin so far :) Thank you
@blablubbabc
The problem is: the transfer is not a single operation within Gringotts, because Vault does not support this. Factions just asks Gringotts to take some money from one account, and if that succeeds, tells Gringotts to add that money to another account. Gringotts can't know that these operations are a single transaction.
With the fix I submitted for Factions, the player sending the money is refunded if it doesn't get deposited correctly.
Until the fixed version is deployed on your server, I'd suggest disabling the /f deposit command (permission factions.money.deposit), and have players add money to faction vaults physically to avoid this situation.
@ebenwert
Okay :) So you can't register inside your plugin, if there is a faction vault / enough space , and if not, simple let the player keep it's items? Aren't both parts, vaults and item-taking, done inside Gringotts anyway?
It would at least be a smaller problem, if the player keeps it's items if the transactions fails (can you register this?).. Faction not registering this and sending a false message about the success of the transaction is the smaller problem.. Or has faction to "send the items back" on fail ? 0o
@blablubbabc
The bad news is, this is mostly a Factions issue, since Factions ignores the return value from Vault indicating a failed deposit, and Gringotts has no (reasonable) way of knowing where the deposit came from.
The good news is, I submitted a fix for this problem in Factions, and it will probably be included in the next release. You can already get the current source from Github and compile it yourself: https://github.com/MassiveCraft/Factions
I will also implement some workarounds for cases like this, such as optional virtual storage for money that does not fit into the account, even if it is against the philosophy of Gringotts ;)
hm, I just tried gringotts with factions, and I first forgot to create a faction vault when I deposited gold to the faction. But I lost my gold, even it wasn't deposited anywhere.
Still using v 1.4.0 , will update later, but I guess it's not a matter of version when I look at the changelog (?)
Would it be possible to somehow warn the player and even stop the money/items to get lost, if there is no faction vault anywhere ? I guess Faction will not care.. but maybe cancle the depositing at gringotts side (guess it will send a "false" message from factions then saying "money were deposited", but it also does this at the moment and the items are simple lost..)?
@KStorm1
Glad you like it!
About the chest protection, other plugins such as LWC and Lockette are reasonably lightweight, so I don't feel the need to duplicate functionality.
@ebenwert
Yeah, I run an offline server because not everyone that plays has paid for their copies. So it's mixed. Using authme to keep everything kosher.
No biggie, I'm just going to enforce no spaces on the login part.
As for the /moneyadmin c command, no biggie, thanks for the reply.
The mod is amazing. I do wish the sign / chest comes with protection by default. It's no big deal since I use residence to protect it for everyone, but to keep it lighter weight for smaller servers, it would be nice to have protection from the get go after creating.
@KStorm1
Normal Minecraft accounts can't have spaces in them. Are you using any other plugin that allows aliases with spaces, and also allows the aliases to work with commands?
/moneyadmin c has been removed, since with multiple denominations it's not really possible to give a single capacity number
I don't know if this has been asked or if anyone else ran into this, but players with spaces in their names aren't working when typing them in as names. Is there a way around this?
Can't type say; /moneyadmin b <word1 word2>
also I see /moneyadmin c isn't listed anymore, is this intended? Using latest beta version 1.4.0 RC1
@jordan_the_baker
sure, i'll put it in the next release
can you add /pay instead of /money pay [amount] [name] because that is a little long?
@remdul
Great, let me know how it works out. I might consider adding world support to the config, but for now, permissions are probably the way to go.
@ebenwert
I'll definitely give it a try. Unfortunately it means moving away from the McMyAdmin interface due to its lack of supporting mutliworld permissions. What must be done be done, though.
@remdul
Thanks!
You can quite simply disable creation and use of vaults on a world-basis by using a multi-world-capable permission plugin and disabling following permissions for your creative world:
gringotts.createvault, gringotts.usevault, gringotts.transfer
This should disable any items in their inventory or chests to be used as currency.
Also make sure players can't transfer items via enderchest, and you should be fine.
Howdy,
First off, I'd like to say that I absolutely love your plugin! We've been using it for quite some time now on our server. Thank you for putting your time and effort into the community.
I would also like to request the addition of Multiworld support. Unfortunately, we're going to have to move away from this plugin due to our players attempting to abuse the system and creating vaults in the creative world, then paying each other with the unlimited emeralds in the survival world. If there was a way to disable worlds from vault creation in the config, I would be most appreciative. Thank you again for your consideration!
Remdul Underground Miner
@ebenwert
No, I didn't. I didn't read your nice document for install.
Thanks a lot. I will try.
@dfdgsdfg
Hi, have you added the derby jar to your craftbukkit/lob folder? (see installation section)
Thanks!
I have some errors with server init.
2013-01-01 15:43:29 [INFO] [Gringotts] Enabling Gringotts v1.4.0-RC1 2013-01-01 15:43:29 [INFO] [Gringotts] Found Bukkit version: 1.4.6-R0.3. All features enabled. 2013-01-01 15:43:29 [SEVERE] Error occurred while enabling Gringotts v1.4.0-RC1 (Is it up to date?) java.lang.ExceptionInInitializerError at org.gestern.gringotts.Accounting.<init>(Accounting.java:17) at org.gestern.gringotts.Gringotts.onEnable(Gringotts.java:61) at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:217) at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:457) at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:381) at org.bukkit.craftbukkit.v1_4_6.CraftServer.loadPlugin(CraftServer.java:282) at org.bukkit.craftbukkit.v1_4_6.CraftServer.enablePlugins(CraftServer.java:264) at org.bukkit.craftbukkit.v1_4_6.CraftServer.<init>(CraftServer.java:218) at net.minecraft.server.v1_4_6.PlayerList.<init>(PlayerList.java:52) at net.minecraft.server.v1_4_6.DedicatedPlayerList.<init>(SourceFile:11) at net.minecraft.server.v1_4_6.DedicatedServer.init(DedicatedServer.java:104) at net.minecraft.server.v1_4_6.MinecraftServer.run(MinecraftServer.java:399) at net.minecraft.server.v1_4_6.ThreadServerApplication.run(SourceFile:849) Caused by: org.gestern.gringotts.GringottsStorageException: Could not initialize database driver. at org.gestern.gringotts.DAO.<clinit>(DAO.java:37) ... 13 more Caused by: java.lang.ClassNotFoundException: org.apache.derby.jdbc.EmbeddedDriver at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at org.bukkit.plugin.java.PluginClassLoader.findClass0(PluginClassLoader.java:80) at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.java:53) at java.lang.ClassLoader.loadClass(ClassLoader.java:423) at java.lang.ClassLoader.loadClass(ClassLoader.java:356) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:186) at org.gestern.gringotts.DAO.<clinit>(DAO.java:35) ... 13 more