ServerShop
ServerShop - Selling to the Server without complicated commands!
****This plugin requires Vault.*********
Overview
I wrote this because I was looking for a mod that would allow players to sell items to the server without the hassle of learning slash commands or looking through a whole room to find the stall that is buying that specific item. What I came up with is a single sign, that when left clicked, will sell all items matching the one in your hand immediately. There is a second sign that, when clicked, reports how much the item is worth.Installation and Configuration:
The Installation has changed, but trust me... its for the better. Drop the ServerShop.jar and ServerShop folder inside your plugins directory. It is NOT necessary to replace the database folder when updating. The folder only needs to be added the first time. Otherwise, you may lose all of your pricing data! You may edit the database file inside the folder with any SQLite editor OR you may use the in game commands to change prices. To change a price, make sure you have permission, then type the following /servershop price [item number] [value]. Example: I want to change the price of cobblestone to be $1 each. I would type: /servershop price 4 1 . Alternatively, if you are holding the item in your hand, you may type /servershop price this 1 . Setting the price of any item to zero will inform players that the item can not be sold to the server.To use the signs, a player must hold the item that they desire to sell in their hand and LEFT CLICK the Sell sign. This will total all matching items in the players inventory, sell them, and report the sales to the player. Left clicking on the PriceCheck sign will report the item value, the total number the player has, and the total value.
Additionally, permissions may be granted to allow players to check the price from anywhere, rather than using the sign. If I wanted to know the price of cobblestone, i could simply hold cobblestone in my hand and type /servershop price this or i could type /servershop price 4 while holding anything else. Admins can now check to see how many of an item has been sold to see if the price needs to be adjusted. Any player with servershop.pricechange permissions can type /servershop totalsold this OR /servershop totalsold [itemnumber] to find out how many have been sold. servershop totalsold reset can be used at anytime to reset all of those totals to 0.
Sign syntax:
[ServerShop]PriceCheck
This sign will report prices
[ServerShop]
Sell
This sign sells your items to the server.
Permissions
ServerShop runs on 4 very simple permissions.- servershop.create (allows player to create the servershop sign)
- servershop.use (allows player to sell items to the server)
- servershop.pricechange (allows user to use the slash command to change prices)
- servershop.pricecheckanywhere (allows user to pricecheck anywhere using /servershop price this OR /servershop price [itemnumber])
TO DO
Move the prices.txt to the ServerShop folder rather than the root of the plugins folderAdd permissions for sign useAdd permissions for sign creationadd SQLite supportadd slash command for admins to change prices ingameadd slash command for price-checking from anywhereadd a counter for each item sold for admin use- add option for parabolic floating values based on popularity of item sale to prevent players from exploiting a single resource
SOURCE CODE
CHANGE LOG
**Special thanks to TheInfestation, He is a great friend and an amazing programmer.
-
View User Profile
-
Send Message
Posted Jan 4, 2014Wow.. apoligies for the EXTREMELY late reply haha... I was unser the impression that comments would mirror to the dev.bukkit site along with updates. Servershop requires Vault and any vault-friendly economy plugin.
-
View User Profile
-
Send Message
Posted Dec 4, 2013Updated Project from "Beta" to Release. The project is over a year old with no reported bugs :) The files and Installation remain the same. I'll probably do more code cleanup and re-release in the near future! Thanks to everyone who has helped in the beta testing process.
-
View User Profile
-
Send Message
Posted May 28, 2013first yay
anyway does it need another plugin to work?
-
View User Profile
-
Send Message
Posted Jan 29, 2013Hi danbovey, The reasoning behind the Left Click action is to prevent a player with building permissions from placing a block in front of his face when using the sign. I could potentially cancel the build event, but i'm not sure if it could potentially miscalculate your total blocks by 1 in doing so. I figured that only people in creative would 1-hit the sign, and those people probably shouldn't be selling items if they could potentially spawn them ;) If you would like, I can compile a version for you with right-click selling instead and you can tell me how it works, maybe i'll tweak it till I can make it left or right without problem :)
-
View User Profile
-
Send Message
Posted Jan 28, 2013Hi, you've made an amazing plugin but wouldn't it be easier to RIGHT CLICK the sign like in Essentials Signs as ops and mods who can break the sign cannot use the server shop.
-
View User Profile
-
Send Message
Posted Dec 28, 2012Another quick update. I have integrated SQLite and it will be used in future versions rather than the text file. It is a much more efficient means of storage. I am rooting out bugs and working to get another release out soon. Any problems or suggestions, feel free to comment :)
-
View User Profile
-
Send Message
Posted Dec 20, 2012Hang tight everyone. I am currently doing a MAJOR restructure of the code while I migrate to SQLite. I am still rooting out some evasive unhadled nulls (I think) and I expect another release in the next few days.