FancyShop
FancyShop
Create chest shops that trade in physical currencies. Now with 1.8 support!
github.com/DeltaWhy/bukkit-fancyshop
Features
- Create chest shops with a graphical interface.
- Use in-game items as currency.
- Buy and sell any item - enchanted items and books, potions, even items with lore or custom NBT data.
- Buy and sell up to 27 different items in a single shop.
- Shops are protected against damage and against stealing with hoppers.
- Create admin shops that can buy and sell an unlimited number of items.
- Restrict shops to certain regions (depends on Flags).
Commands
/fancyshop: Create and manage shops. (Aliases: /fs, /shop) /fancyshop create - Create a new shop. /fancyshop remove - Remove a shop. /fancyshop rename <name> - Rename a shop. /fancyshop setadmin true - Make a shop an admin shop. /fancyshop setadmin false - Make a shop a normal shop. /fancyshop currency <name> - Add the currently held item as a custom currency.
Configuration
See Configuration and Region Support.
This plugin uses Hidendra's PluginMetrics which sends some anonymized data about your server to mcstats.org. This data includes the plugin and server versions, the server's Java version, the number of online players, the OS version, etc. If you want to opt out you can do so by editing plugins/PluginMetrics/config.yml and changing opt-out: false to true.
Usage
To use a shop, just right-click its chest. You will see a menu of the shop's offers.
To buy an item, click on it while holding currency matching the 'Buy' price. To sell an item, click on the offer while holding that item.
To set up a shop, type '/fancyshop create' and then right-click a chest.
You'll see the 'Manage Shop' menu - to add an offer click on an empty slot while holding the item you want to buy or sell.
To set the price, click that item while holding your desired currency. The wool icon in the bottom right tells you whether you are changing the buy or sell price. Click it to switch. Don't forget to add the item you are selling (or the currency you are buying it with) to your chest. Right-click the chest while sneaking to open it normally.
To remove an offer, click the fire icon in the 'Manage Shop' menu, then click it.
Shops are automatically protected against damage and theft. To break a shop chest, first remove the shop by typing '/fancyshop remove' and right-clicking it. Then you will be able to break the chest normally. These protections can be disabled in config.yml.
Why another shop plugin?
I'm not a fan of economy plugins. While they might make things simpler on large servers, they don't seem very Minecraft-y to me. They add a layer of abstraction that I feel takes away from the survival aspects. However, I like having shops - they give players more choice where to spend their time. If you don't want to spend time mining cobble or building a big farm, you can buy them from someone who does. So I wanted a shop plugin that can use in-game valuables rather than creating an artificial currency.
Why not use GoldIsMoney, Gringotts, etc.?
Because I don't want to inflate any one item (gold, emeralds, diamonds, etc.) by making it the sole currency. On my small whitelisted server, I don't need world protection or other plugins that need Vault compatibility.
Permissions
fancyshop.create: description: Create a shop. default: true fancyshop.create.anywhere: description: Create a shop, bypassing region permissions. default: op fancyshop.rename: description: Change the name of your shop. default: true fancyshop.use: description: Use other people's shops. default: true fancyshop.remove: description: Remove someone else's shop (you can always remove your own) default: op fancyshop.open: description: Open chests for other people's shops. default: op fancyshop.setadmin: description: Create unlimited (admin) shops. default: op fancyshop.currency: description: Add custom currencies. default: op
@otterun
That is really strange - I looked at the code and at least in version 0.4 the first thing that happens is depositing the currency in the chest, even before taking it from the player's hand. So it doesn't sound like it is crashing before finishing the transaction. I could be wrong though, you should definitely still check your server logs for an error trace. In fact if you just want to PM me the whole log file that would be helpful as well. A copy of your shops.db might be handy too. What other plugins are you running?
@DeltaWhy
Hey Delta!
It's something I've actually seen happen. I bought a saddle from a player for 4 diamonds; he only had one for sale and one in the shop inventory. I had a stack of diamonds, clicked the saddle, it reduced my stack of 64 to 60, like it should, and I got my saddle. Hovering over the saddle showed that it was sold out, but it was still in the shop inventory. He never received his diamonds. Similar issues have happened, sometimes with the stock disappearing as well as the payments.
I don't currently have a video, but I'll try to see if I can get one. We do have periodic restarts throughout the day.
Good news! I was able to track down MrCobayo's dupe bug. It was an issue with the internationalization code, which I sent him a pre-release build of to test. So no one else should be affected, and I will add some more checks before I release that feature so that a bad translation file can't crash the plugin.
Now if I can just get some info on the missing items bug I'll be set. Are you actually seeing it happen, or is it the same as the previous reports where it seemed fine until they came back days later to check on the shop? If it's the latter, is your server configured for nightly (or any interval) restarts? If you are actually seeing it, can you get a video? That would be the next best thing after a crash log.
@otterun
Definitely a bug. You're not the first to report it but no one has been able to give me enough information to reproduce it. I don't have any way to fix it when I can't test it. Same issue with the dupe bug, except MrCobayo is running 60 other plugins so I wouldn't be surprised if one is interfering somehow. Both of them sound like the plugin is actually crashing, which should produce an error message and stack trace on the console. If you can screenshot that, it would be tremendously helpful.
I have been working full-time this summer so I haven't had much time to work on the plugin. I'm going back to school next week so hopefully I can find some time in between classes and other responsibilities. Besides fixing those bugs, there are a lot of features and improvements I still want to add before I can call it 1.0 and out of beta.
@otterun
We seem to be having some other issues too, not just with books. It seems that when a player purchases from another player's shop, the payment is collected and the buyer receives the item, but the shop owner loses the item and doesn't get any form of payment. We've been testing it out and we know how the buy/sell functions work. It seems like this is a bug? Is there anything I can do to prevent it or is this part of the bugginess that might come with a beta plugin?
People can duplicate items with this plugin.
Hey there! I love this plugin and how it maintains the vanilla feel I strive for on my server. We seem to be having a problem with enchanted books, though. People are able to buy enchanted books from other players, but for whatever reason they don't receive the currency for them. I've had this happen in 3 separate player shops, both selling enchanted books for diamonds. Do you have any insight on how I can fix this?
Is there way to use iConomy and the money with this plugin?
Example: I want to set up a shop and I want a person to be able to buy 20 wool for $40.
Is that possible?
@Bras
Do you see any error messages in the server console? Because that sounds like the plugin is crashing when you run the command.
@Typical_Name
Yes, it's already implemented on master. It will be in v0.5 but I don't want to release until I've finished a couple of other features. If I had to though I could get a mostly UUID compatible version uploaded by tomorrow (Flags has a beta with UUIDs but not a full release).
Is this plugin going to be ready for the whole "UUID" nonsense they're going to be doing in 1.8?
@My_Name_Was_Stolen
Looks like I had a bug in the database upgrade code. It looks like it should resolve itself though after you've /reload'ed or restarted the server. Are you still seeing the error messages?
@Typical_Name
No, that's a good point. I've added a feature request ticket, I'll add it when I get the chance.
Minor issue: Is there a way for the shop owner to set the amount of a particular item he is willing to buy? I know that you can simply put in only the amount of currency you want to spend in the shop's inventory, but that solution assumes that only one item is being bought by the shop for each currency. For example, say I own a shop that buys diamond hoes and porkchops, and both deals trade in gold nuggets. I probably won't need a lot of diamond hoes, but I might want to amass a large supply of porkchops. How can I make it so that the store only buys a set amount of hoes so that it has money left over to buy porkchops?
Using Fancyshop 0.4 on the latest beta (1.7.9) of bukkit, and I keep getting this error whenever a command from this plugin is used.
http://pastebin.com/A78BDARP
The features all seem to work correctly though
About the protection: Is there a way to turn it off? (I plan on using LoreLocks for my chest protection) And if not, is there a way to make it so that players can only place the items they are selling/buying into the chest? I don't want my players to make shops for the purpose of protecting their items, particularly since I'm considering using PrisonPearl. If not, that's fine, I notice in the config that you have an option to enable hoppers to steal from chests, and I guess that's enough (players would protect their chest using Citadel to reinforce the block under their chest).
@My_Name_Was_Stolen
You can do this already. Use the /fancyshop currency command to add each of your Coinage currencies, then you can edit the config.yml to allow only those currencies by setting currency-whitelist: true and deleting the default lapis lazuli currency.
Would it be possible to allow currency to have custom NBT and Metadata, or perhaps hook with coinage?
http://dev.bukkit.org/bukkit-plugins/coinage/
I'm adding i18n support for 0.5. If you are fluent in English and another language, you can help by adding a translation. Edit strings.yml and send me a pull request on GitHub (preferred) or a PM on BukkitDev.
@GnrlKitty
That will be possible with the command interface I'm working on. You'll be able to set amounts bigger than a stack so you could do 128 iron blocks.
Would it be possible to add the ability to make the cost of an item be multiple items? Like for instance, two stacks of iron blocks.
@Typical_Name
That was poorly phrased. The use case I was thinking of was having a written book signed by a particular player as a currency. This would not work in 1.7 since any player can make copies of a signed book by crafting it with a book and quill, so you'd need a plugin to prevent people from "forging" the currency in that way. Same with maps.
If you're using lore or something similar for your custom currency, where players don't have a way to craft it, you don't need any other plugins.
@croftcw
Not yet. I can add that along with UUID support in the next version.