Coinage
Not compatible with 1.13+. This is an old plugin that would require an almost total rewrite to get it working in more up-to-date servers. Sorry!
A coin-based economy plugin, designed to mimic real currencies for RPG-style servers. Create as many different currencies, with as many different denominations of coins (or notes/tokens/chips etc) as you want. Each coin is unique and can be customised, using any item, with a custom name and print. Hooks into Vault so it can be used with other plugins, and has a comprehensive selection of commands to create, spend, distribute, convert and modify coins which can be used in command blocks and scripting plugins.
Features
- Can use any item type as a coin
- Supports multiple denominations of a currency
- Uses item display names and lore to make coins unique
- API support for other plugins to use (https://github.com/XHawk87/Coinage)
- Provides a variety commands for admin management and command block use
- Can give or take specified values of a currency from inventories
- Can make change for a given value
- Supports multiple currencies
- Can convert between currencies
- Can manage currencies through commands or configuration file
- Can integrate with Vault to set one currency to be used as the Vault currency
Ideas for Future Development
- Fully customisable lore for each individual coin, as many lines as you want, containing as much text and colours as you want
- Allow chests and other inventory blocks to be used in place of players in Coinage commands using their coordinates
- Add Vault support for non-Coinage currencies in the /ConvertCoins command to allow conversion through Vault
- Optional command to be executed when /SpendCoins fails due to the player not having enough currency available
- Bank support (possibly using chests)
- Compatibility with Skript to provide per-currency checks and transactions
- Allow currency to be transferred to offline/non-existent players through Vault
- Allow adding, removing and modifying commands that can optionally be run after various other Coinage commands
- Add optional arguments to the end of /SpendCoins ([currency]) [player] [amount] ([success] [fail]) to trigger customisable commands on success or failure to remove the coins. @player @currency @amount will be replaced with the actual values as it is parsed
- Add optional argument to the end of /CoinValue ([player]) ([currency]) ([trigger]) to trigger a customisable command after calculating the value in coins the player is holding. @player @currency @amount will be replaced with the actual values as it is parsed.
- Improved support for servers using ANSI text-encoding
- Optionally record amount of coins on item lore/title instead of using the stack amount (bypassing the 64 item limit)
- - Optionally set custom stacking limits
- Provide optional feature to automatically mint coins as they are picked up
- Add a command to open a moneybag for a player
- Add tab-autocompletion to all Coinage commands
If you have an idea, please make a suggestion in the comments!
Known Bugs
- Using any of the currency transaction commands while there are no currencies will throw an error instead of a nice message explaining what's wrong
- Due to a weakness in Minecraft client support for custom inventories, items will very occasionally be lost on placing them into moneybags
- There is a time-related bug in Coinage 2.1 and 2.2 which will prevent any changes to Moneybags from being saved, to fix this, you should update to Coinage 0.2.3 or downgrade to the latest release build
Commands
A full list of commands is available on the Command Reference page.
Detailed command help is available in-game by typing /help Coinage
Troubleshooting
This plugin uses Java 7
If you get the followed error on starting up the server with this plugin installed "Unsupported major.minor version 51.0". This means you are using an out of date version of Java. If you don't know how to upgrade, please contact your server hosting provider and ask them for help in upgrading to Java 7, or contact Oracle customer support. Mac OS X users require JDK 7 instead of JRE 7.
Donations
If you'd like to contribute towards the continued development, support and maintenance of this project, please consider joining me on Patreon, and making a one-time or recurring pledge.
Help
If you need help you can leave a comment below and I will get back to you as soon as I can. You can also join my IRC chatroom using the following link. Please note, I am not always at my keyboard! http://webchat.esper.net/?channels=XHawk87&prompt=1
@XHawk87
Thanks.
If this feature is implemented I will change to this from my currencyitem based economy system! My players will love me for it. And I'de love you for it. :D
If a donation would help encourage you to work on that feature, I think we can arrange something. (:
@nullschritt
That is an interesting idea. I will consider providing it at a later time as an optional alternative to stacking items.
A configuration option for automatically minting coins, something similar has been suggested before, this may be a popular feature. I will consider it.
@XHawk87
Would it be possible to store the number of coins in the item lore?
(Say for example I have emeralds, gold nuggets, and diamonds as different values, and player has 1000 diamonds 10 gold 100 emeralds, could it be possible to just have one coin item for each in inventory, and when they hover the coin item, it shows the total number of coins?)
I just think this would be a good way to store physical coins (this way it would have a physical representation, without taking up a ton of inventory space)
I of course understand that by default if the player dropper the coin it would drop the whoel coin stack, but you could probably make it so that 1 coin could be removed from the lore on drop, and that picked up coins are automatically added to an existing coin item.
Just some ideas. I really like the idea of a item-coin based economy, but it limits the total amount of cash a player can carry at once. (I understand there is the money-bag, but I am suggesting a feature simmilar that uses the items themselves instead of a bag)
Also, maybe a configuration option for currency items to automatically be minted to coins when picked up.
@Spearhartt
Bank support is uncertain, however offline transactions is in the current dev sources on github, I just haven't had the time to fully test it yet.
How soon do you think you will have the bank support out? Also, does this support offline transactions?
@madtomic
This was built under and works on CB 1.7.2-R0.3. The file is clearly marked as supporting versions from 1.6.4 to 1.7.4, that includes 1.7.2, so why ask?
Any plans for cb1.7.2-r0.3?
@andjelovuk I use Coins from Custom NPCs, it's better than default items.
@andjelovuk
The stacking of coins is controlled entirely by the stacking of its base material.
Bukkit has no API methods for changing the stacking properties of a material, and even if it did, a lot of the control for stacking is done on the client-side, so any purely server-side changes would result in glitches for clients.
Can you make it so coins stack up over 64?
I just have an idea where each player has a bag in the inventory, which fixed at 9 slot, and bag associated with player account from optional Vault economy plugins, players just put item-coins into bag. It will make great role-playing aspect, and it's better than just inventory money with lags.
@OceanCubes
The thing is that Coinage doesn't actually store any player accounts information, nothing about how much currency a player has and where, they are just normal items that are stored in the region files of the world and player.dat files of the server.
The only flatfiles are the moneybags, if you use that feature, and it isn't recommended to use custom inventories that span multiple servers as you leave yourself open to item duplication exploits.
Maybe you can add MySQL support? With optional tables and columns?
It would be great :3
Please, i don't know item-based iconomy plugin better than this, EmeraldeEconLink causes severe load, Iconomy can't use mysql with item mode, this plugin is perfect for my RPG server, and any same server.
@OceanCubes
I am not going to add support for any other economy plugins. There are too many of them to support them all that way, and it would be a waste of time when you can just convert between them instead.
As you can see on the Development Ideas section: "Add Vault support for non-Coinage currencies in the /ConvertCoins command to allow conversion through Vault"
The /ConvertCoins command could then be used for converting Coinage currencies into the Vault currency (iConomy or any other Vault-compatible economy plugin), and vice-versa.
Can you make IConomy support? It's great plugin, but i can't use it without IConomy's MySQL tables, because it'll break my system. Like, when player put coins into his bag, or his bank chest, nuber of coins "+" for iconomy balance. Please, i'm very like this plugin!
Sorry for my english :)
@jwc65
I have no plans to add any features like that.
Will this plugin ever be like fe where u can use the same economy accross servers and maybe add a feature of 2x coins with a certain permission if posible so each time u get coins while having that perm u get 2x coins
@NeverCast
Lore is the text underneath an item when you mouse over it. By changing the lore, it is held entirely separately from items with the same ID/data and no lore. They will not stack with the normal items, and Coinage will recognise that only items with this specific lore on them are currency. So long as no-one has been given the ability to add lore to items, either from being creative mode, or from using other plugins, then it is not possible to forge currency.
It is also not possible to use Coinage currency in the same manner as the normal item. You cannot make boats out of a wooden plank currency, for example, nor could you attack someone with an iron sword currency.
It is probably best to think of the item used for the currency as its image or icon only.
Hello! I am just setting up a new server with a friend and am a little interested, and yet concerned with how this mod uses items. You say it uses 'Lore' ? to change the name of the item? Does this make it's functionality unique also? For example, as some of the currency, the item id melon seeds are used in the example config. Are these the same as the farmed melon seeds? Could someone farm watermelon and gain currency directly? Alternatively, could the currency be used as actual seeds to plant melons? Or is all of this blocked either by CraftBukkit/Vanilla functionality, or this plugin?
Thanks kindly for your time, NeverCast
Edit: Source code answers just about everything these days: https://github.com/XHawk87/Coinage/blob/master/src/main/java/me/xhawk87/Coinage/listeners/CoinListener.java
I've left the comment here if you want to add anything, otherwise I'm sound in my concerns. Cheers.
@My_Name_Was_Stolen
In order to use a Coinage currency as the Vault currency, you need to use the /SetVaultCurrency command or set vault-currency in the config.yml to the ID of the currency to use for Vault. A restart will be required before all plugins are aware of the new Vault currency.