Supply N Demand
Supply N Demand rewards players for adding items to chests, and charges them for removal. This plugin adds the flavor of capitalism to your market to keep things fresh and delicious. Those who add items to designated "Supply" chests are rewarded in the form of money. To remove items from such a chest requires money. Thus, those who add more can take more; those who work harder and share, get rewarded.
Sharing is a caring, and it can be fun. A community built on shared resources can be extremely helpful to all the members of it. But that methodology only works when people donate at least as much as they take. Else supplies diminish and depression may result. Enter Supply N Demand!
If an item is more common in a Supply chest, its price goes down. Conversely, less of an item means more of a demand and therefore the price raises. This process helps balance out prices. As dirt will be common and abundant, it will be cheap; diamonds being rare and few in stock will cost a pretty penny.
Features
- Bring capitalism to your server
- Create "Supply" chests where items are bought and sold
- Prices vary by supply in chests; the more dirt is in there, the less its worth
- Scalablness of cost can be set in pricelist.yml or in game. (Higher scale number is more stable price)
- Prices are initially set up randomly. Edit them to your liking in the pricelist.yml or in-game.
- Supports all major economies (by use of Vault)
Requires
- Vault
- Some major Vault supported economy plugin
Permissions
- All players can access chests,
- Only OP can designate Supply chests and change prices
Installation Instructions
- Download file (Link to your right)
- Stick file in your "Plugins" folder
- Do the same with Vault, if you don't already have it, and an economy plugin.
- Start server
Commands
- /supply : while looking at a chest toggles it to be a "supply" chest or not
- /supply price [item] : checks the price of item
- /supply price [item] [price] : sets the price of item
- /supply scale [item] : checks scale of item
- /supply scale [item] [scale] : sets scale of item
- /supply stock [item] : checks amount of item in supply chests
- /supply cost [item] : checks cost of item (evaluated with current stock)
Permissions
No permissions needed. Only "Op" can toggle chests and set prices. All else if available to all.
Known Bugs
- None known
Upcoming Features
- Damaged items price reflects damage amount
- Enchanted items worth more (multiplier?)
- Permissions (if people care. Otherwise I will just leave it for Op)
- Open for other suggestions, let me know in the comments
@McJellyGooby
I just found this plugin and want to thank you for this post. Otherwise I am VERY excited to have found this.
When that duping bug is fixed this is going to be a perfect compliment to my servers economy! I'll definitely have my eye on this one :)
Thanks n0trub!!
edit- I think bigscary's idea is great, that would definitely help keep the Server Stores organized. Two more cents from me: I have players who keep their stock organized. I would not be opposed to allowing this chest organization functionality to the users but I would NOT want them to be able to build Supply N Demand chests. If the organization feature were limited to SupplyNDemand chests (which could only be built by operators) that would be cool too :P
OR (forgive me if this sounds prohibitively complicated) You could set up something to the effect of default(consumer), proprietor(those with permission to build shops but only destroy those that they make) and admin permissions. Here's the catch.. make the Supply N Demand prices calculate per chest relative to other Supply N Demand chests within a set proximity. That way you would see local fluctuations in price based on local supply and demand.
With regards to sandbagging the econ for profit: I guess a tax is a workable solution but only if the tax is greater than the potential price drop :/ which would limit the range of fluctuation. May I suggest a buy-back cool down for the seller? Say a seller sells 64 diamond, dropping the price of diamonds.. for a set cooldown period the seller can only buy diamonds at (or above) the price he was paid when he sold them. In the meantime other players may buy at the new depreciated price. Make the cooldown something like 24 hours real time so any other member has 24 hours to buy up the diamonds at the new low price before the seller can buy them back.
One more idea: If possible I think it would be beneficial (I may be way off base here.. just an idea) to limit transactions to one stack per item. Imagine there are 10 stacks of something. Someone buys all 10 stacks at once wiping out the inventory causing a spike in the value of that item. If you limit transaction to one stack the prices would update after each transaction. I may be way off in my thinking here but the way I see it this would help keep the economy stable.
Bukkit 1597
One of my players found a severe item duping exploit with your plugin: If one withdraws a stack of items they cannot afford, and does not close the chest interface, one can pickup that item and exit the inventory screen, causing that stack to drop on the ground as it normally would. This item is now free to pick up, and the supply chest's inventory is unchanged, allowing item duplication.
I won't be able to use your plugin until this exploit is covered. Sorry. Otherwise, excellent work.
@n0trub
New issue, I am not able to sell using BOSEconomy. says 'you were paid 0.0 for selling -1 SAND' as an example. When trying to sell more items, it says -4, -12, -33, etc.
BOSEconomy just doesn't want to agree with your plugin! :P
@bigscary
Thanx for the idea. On my server, we have labels by the chests to say what goes in them. There is no enforcement on it, just people trying to keep things organized. I have considered writing a plugin in addition to this one that will only allow in a chest what the sign says, basically to enforce what is being done. Would there be an interest in that from people? or would it be a waste of my time?
I like this idea much better than the other auction and shops which are built on slash commands, because it integrates better with the core Minecraft experience. Props! If I were to offer any economy at all on my server, I would certainly prefer one like this.
Feature suggestion: Limit the items which can be placed in specific supply chests. I recommend this because I imagine a case where you've got 20 supply chests in a room, and players have to open many chests to find the item they want to buy. Would be better if some chests could be designated for example "common blocks" and labelled as such with a sign, while others say "diamonds" or "bars" or "tools".
@raydarken
After some help from the Vault developers, I have found my error. The plugin should now work with your BOSEconomy, and all others supported by Vault. Thanx for reporting the issue to me.
@n0trub
Checked again last night, using the latest of all the plugins needed (as of yesterday), including the latest Vault, BOSEconomy, Spout, and Supply N Demand. Still had the issue. When I switched over to iConomy however, everything worked fine. Maybe it's a BOSEconomy settings issue? I will probably just switch over to iConomy to be able to use this plugin, but still need to verify all my other plugins will not break with that change.
Thanks for the help and reply!
@DescentDesigns
You are correct. I thought of this too while testing it, and therefore added a "Tax" to the buying side to prevent this, making buying slightly more expensive than selling. This tax amount is configurable in the config.yml file. If you can think of a better way of doing this, I would love to know it. But this is the best I could think of.
While reading about this plugin, I have noticed a possible exploit which may occur.
Say there is 2 diamonds in a chest and I, being the millionaire that I am, have 62 diamonds with me at all times. Couldn't I just deposit the 62 diamonds (which would make the price automatically go down due to abundance in the chest) then take the whole stack of 64 out for a little more than I got from depositing...?
Essentially, this exploit would occur amongst rich players only - however, it would help make the rich even richer... so....
@raydarken
The use of Vault is supposed to keep all economies working the same. I have noted your bug though and will look into it. Which version of BOSEconomy are you using? Do you have Vault installed? Which version?
Thanx for your interest in my work and reporting bugs.
Hello, I have installed this and tested on my server and have encountered a bug. My server has BOSEconomy installed and working. Supply N Demand also works, but when I sell/buy any items with this plugin my BOSEconomy money does not change (using /econ) command, and buying items doesn't seem to reduce/consider BOSEconomy balance. It seems like the plugin is storing player money in its own database but not hooking in to BOSEconomy correctly? I checked the config files but there was no information on choosing a economy plugin or their settings.
Thanks for looking in to this, I'd love to use this plugin on my server. :)
@Secpro
The source is included in the .jar file. The plugin does nothing once someone goes through a Nether Portal, as though it were not there at all. No errors thrown. As for enchanted and damaged items, they are treated as normal right now. They still can be bought and sold, but the extra data is ignored.
Exactly How is the plugin disabled if we teleport through Nether Portals?
And about that bug do you have a github page or something?
And I'm also wondering if it supports Enchanted Items? and Damage Values?
@Nefiron Sorry, I meant to add that earlier. Its in the "commands" section now.
Would be nice if you wrote some instructions on how we setup the chests.