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
How can i change the permissions? i tried to change it in the jar file, but it seems not updated. (i think it needs to be compiled) is there another way to change the permissions?
i want, that default users only can use/open the chest, and all other options and settings for ops. It seems, that my players cannot open the shops/chests even if i change "setadmin" to false.
I'm using this to sell Precious Stones blocks with specific NBT data. When a player buys a block the data isn't being kept, and instead of receiving the precious stone, they get a regular block.
Hey. Are you planning on adding admin shops that don't delete the currency used to buy items? That would be really useful.
Are you able to make items free?
@Pikachu1250
This might be a stupid question, but did you put the items you are selling\buying into the actual chest? Watch the video in the plugin description page above, it pretty much has everything you need to get started :)
Hi! I am trying to setup this shop but it keeps saying that item is out of stock! I created a shop, put out a chest, put in a deal and added the price. Either I need to set some permissions or I'm not doing something right. Please help!
Thanks in advance.
@spetznack
It's actually on my to-do list to add LWC-style ACL's, maybe even (optionally) integrating with LWC. I don't expect to have much time for that though until summer.
@spetznack
Actually, I managed to get around it by giving everyone "fancyshop.open true" but using LWC to set who to allow into the chest. I can't modify the chests after the fancyshop is created, but I can set up the LWC protection before creating a fancyshop-shop on the chest.
At least it seems to be working just fine so I'm going for it :D
@DeltaWhy
I am testing it right now and I realized that it wont work for exactly what I need in it's current state :/
This is how we use shops on my server:
We have one city, Spawn City, where we have elected a mayor to be in charge of building, maintaining and keeping the city active. The only place players are allowed to have shops, is in the Spawn City. The mayor is in charge of creating the actual shop mechanism as well as adding the trades in them. We have been doing this for a little bit over 3 years now and it's amazing to have a active main city :D
So this is what I would need to make it work for my server:
A way for the mayor to allow a player to open and modify the contents of the mayor-owned shop! I can imagine something like /fancyshop allowchest [player]
I really hope this is something you can implement because it's the best and most intuitive plugin out there to set up shops that trades physical items!
Another feature that I guess would be related is the ability to allow someone to change your shop trades. I don't specifically need this but I can imagine it being useful if players team up in survival in a server where everyone can create chestshops :)
If you decide to implement this, I guess we'll need a way to see who is allowed in through fancyshop. Maybe a /fancyshop info ?
I feel like I'm asking for a lot here, I understand if you don't want to do all of this. Though it would certainly solve a lot of problems for me :D
Thank you for reading! And thank you for making and sharing this plugin! :)
-spetz
Version 0.5 (for Minecraft 1.8) is released! This version adds UUID support, translation support, and renaming of shops. I also fixed a bug related to chunk unloading which I believe was the source of several issues with disappearing and reappearing items. Special thanks to MrCobayo for the bug report which finally led me to the problem.
Please back up your shops.db before installing this version as there are some major changes for the UUID support.
I no longer run a Bukkit-compatible server, so feature updates are not likely in the immediate future. I will attempt to fix any bugs that come up, so please keep sending me those bug reports if you find any problems.
I think it's safe to say that spigot 1.8 is legally safe at this point. Can we expect more updates to the bukkit plugin? Sponge is a long way off if it even makes it to stable release.
It is good to see this plugin still active; a lot has changed in Minecraft since I stopped playing around six months ago.
Question: How will the shop work now that Mojang is apparently deciding to get rid of all item metadata? Is this going to cause any problems with the plugin itself? I know it'll cause problems with my economic system, since it was dependent on item damage values to act as dummy variables for new currency items, but the Mojang people are bent on uprooting the old system and I have no right or power to stop them. So I'll have to use a mod or something if I want to bring new items into the game. Which brings me to the question: Does FancyShop support items introduced by client mods?
@spetznack
I'm not totally convinced on the legal status of Spigot 1.8. They haven't removed Wolfe's code (not that they really could have) and he's stated on Twitter that he intends to shut them down again. I don't plan to update before that's settled. That said, the new version is supposed to be mostly backwards compatible, so I expect FancyShop will still work.
I do plan on porting over to Sponge as soon as they have something I can test against. Depending on what happens with Spigot, I'll have to decide if it's worthwhile to maintain a Bukkit API version as well, and if not I would gladly hand it off to someone who does have the time to spend on it.
I hate to say "wait and see" yet again, but it still seems like the best move right now. Let me know if it doesn't work - I'm on winter break so if it's something simple I may still be able to put together a bugfix update.
A group of smart people updated bukkit and craftbukkit to 1.8: http://www.spigotmc.org/threads/bukkit-craftbukkit-spigot-1-8.36598/
Any updates on where this plugin is going? The functions that is shown in the video and description above is very interesting, I will most definitely try this plugin out with 1.8.
My previous favorite plugin was PhysicalShop, but its dev.bukkit page was taken down by the dev (Wolvereness) and it's not working in spigot 1.8. I think this has to do with Item ID's being deprecated and replaced by minecraft:[OBJECT NAME] ?
@supernerd2000
No idea. A couple people are seeing this issue on CraftBukkit and Spigot servers as well, but I haven't been able to reproduce it on my setup or get enough information from anyone to track it down. Check your server logs and PM me if you find an error trace, otherwise there's not much I can do.
This plugin uses only the Bukkit API (not CraftBukkit or NMS) so in theory it could work on a modded server, but I haven't tried it so I can't say for sure. The thing that's most likely to break is saving and loading mod items from the database, which would cause them to all show as "out of stock" after restarting the server. Unfortunately there's no way for me to fix this, as Bukkit doesn't let me access NBT data directly.
Hey, I am the owner of a modded server. I wanted to ask because it seems that whenever a player creates a shop, they put their stock in the shop inventory, but after a while the contents of the shop's inventory disappears. I haven't tested this with modded items/blocks as so far we have only tested with vanilla stuff. I really hope you can get back to me as for why we are having this issue due to the fact that it really is a hassle having to spawn back in vanished items. Thanks in advance.
-supernerd2000
@otterun
There is no CraftBukkit for 1.8. If you are using the 1.8 protocol hack from that other popular server implementation, it will probably work since the server itself is still based on the same 1.7.10 code.
With Bukkit's future looking uncertain, I may end up releasing an update with the changes I already have, specifically UUID support, translations, and renaming shops. Whatever happens to Bukkit, I do want to continue this project. At this point it looks like the Bukkit API will continue in some form even if CraftBukkit is forced to shut down, but if not I will port to Forge or whatever the most viable option is.
My server is getting ready to upgrade to 1.8. Do you know if this will be compatible? Thanks! :)
@Typical_Name
The dupe bug was only in a pre-release build I gave to MrCobayo. I have not tracked down the other one for sure yet, but it may be related to a database setup bug which is fortunately easy to work around - it resolves itself if you restart the server. I've added a caveat to the v0.4 page.
No ETA on the next version. I am working on a command interface which will allow selling more than the stack size, and setting prices when you don't already have the items. Unfortunately it requires a lot of refactoring and I haven't had much time to work on it.
Came to check to make sure the plugin was still being updated. Looks like you're still active, I am quite happy to find :D.
So about this bug you were discussing, is it fixed now? When can we expect the fixed version to appear on devbukkit?