CommandShops - The premier local shop plugin: Version: v4.1.0 Source: GitHub IRC: irc.esper.net #CommandShops Download at BukkitDev: http://dev.bukkit.org/server-mods/commandshops/ Features: Player created physical shops with custom 3D boundaries No physical components needed, business done entirely through commands Updated item compatibility and dependencies Requirements: Vault Any economy plugin supported by Vault Optional Requirements: To use permissions, get any permissions plugin that can feed into SuperPerms (PermissionsBukkit recommended, ask your doctor about SuperPerms support). By default everyone can use and create shops but only ops have the admin powers. To enable MySQL mode you need a MySQL server obviously. Upcoming Features: On-demand transaction log querying Optional Region Protection Plugin integration via multi location support -- restrict shops to owned plots, define location via plot instead of coords, auto-generation of greeting/farewell message XP market + legit repair / disenchant Storage limitations (config,size,chests?) stock variety limitations (upgrade web of similar items?) sales tax (Make shop fees go to the same collector as the sales tax?) multi language support Good servers that use CommandShops: Council of the Realm Commands: [required] <optional> /shop Displays a list of player commands /shop select Select a cuboid area for a shop to occupy. Used in conjunction with both the create and move commands. Using the select command a second time will cancel the selection process. /shop create [shop name] Creates a shop in the area specified by the player after using the select command. This only works if the player has enough money to create a shop and the selection is smaller than the maximum allowed area -- see the config. Remember, shops are created in a 3D space - selecting two blocks on the floor will likely result in the creation of a shop that is a single block tall, which isn’t particularly useful to anyone. /shop info <id> Used while standing in a shop, this command will return information about that specific shop. If a shop ID is added to the end, it will return information about another shop without the player needing to be physically in it. Use either this command or list to get shop IDs. /shop browse <buy|sell|itemname> Shows a list of items currently in the shop and if provided either buy or sell as an argument it will only show those for to buy or sell (from the players perspective). If itemname is provided as an argument, it will instead display all available pricing/stock information for that one item. /shop find [item name|id] Finds nearby shops that either buy or sell the item sorted by distance with the cost per item and stock/max. /shop search <item name|id> Does a test-search showing the results of trying to match your input to an item Shows the text match criteria for the item selected /shop list Lists all shops that the player controls (owns or manages), along with their unique IDs and names. /shop move [id] Moves the specified shop to a new location. The select command must be used prior to this command, to specify where the shop will be moved.. Both list and info will return shop IDs, in addition to other information. /shop destroy Destroys the shop the player is currently standing inside. The owner of the shop will receive anything that was left in stock, inventory space permitting. /shop add <item name> <amount> Used without an item name, adds the stack of items that the player is currently holding. /shop remove <item name> Used without an item name, removes all stock of the item that the player is currently holding from the shop. /shop buy <item name> <amount> Purchases a specified item from a shop. If the player uses ‘all’ in place of an amount, the shop will attempt to fill the player’s inventory with the specified item, money (and item stock) permitting. It's free to 'buy' items from a shop you own. /shop sell <item name> <amount> Used without an item name and amount defined, sells the stack of items the player is currently holding. With an item name defined, a specific item (a single item) is sold to the shop. If the player uses ‘all’ in place of an amount, all instances of that item in his inventory will be sold. Selling to a shop you own doesn't move any money. /shop set Help page - displays a list of set commands. /shop set buy [item name] <price> Used to set the price of items that the shop will be able to buy or purchased from customers. Omit the price to stop buying the item. Both this command and the set sell command below are set from the perspective of the shop, not the customer; in contrast the buy and sell commands are always from the perspective of the customer. /shop set sell [item name] <price> Sets the price of items that can be sold to the customer. Omit the price to stop sell the item. /shop set manager +/-[player name]ex: /shop set manager -cerealk +Mineral Adds or removes managers from the player’s shop. A manage is able to add/remove items, set prices and set maximum amounts. He cannot move the shop, destroy the shop, nor add/remove managers. /shop set minbalance [amount] Sets a shops minimum balance that must remain in the account at all times. Helps prevent players from selling to a shop and completely bankrupting the owner. /shop set max [item name] [max amount] Used to set a maximum stock limit for a specified item. Note that the owner of the shop will still be able to add items above the maximum stock level, but the shop will not buy items from players if the current stock level is higher than the maximum specified amount. /shop set notification Toggles if the shop owner is to receive periodic transaction notifications via chat. /shop set name [newname] Change the name of the shop. /shop set owner [player name] Changes the shop owner to another player. /shop set unlimited moneyRequires a special permission node: commandshops.admin Sets the shop to have unlimited money - useful for a server shop buying items from players. The money from items sold to the shop while this is toggled on will go to whoever is set as the shop owner. If the owner is set to a player that doesn’t exist (ServerBank, for example) the creator of the shop won’t get the money from item sales. /shop set unlimited stockRequires a special permission node: commandshops.admin Sets a shop to have an unlimited amount of all stocked items - keep in mind that items still need to be added to the shop for them to appear in the shop’s inventory. Permissions: Code: permissions: commandshops.user.*: description: Users can buy and sell to shops but not make or manage them. default: true children: commandshops.user.buy: true commandshops.user.sell: true commandshops.user.browse: true commandshops.user.buy: description: Allows buying from shops. commandshops.user.sell: description: Allows selling to shops. commandshops.user.browse: description: Allows browsing of shops. commandshops.manager.*: description: Owners and Managers can create, move or destroy shops and manage shops (using the set commands) default: true children: commandshops.manager.add: true commandshops.manager.create: true commandshops.manager.destroy: true commandshops.manager.move: true commandshops.manager.remove: true commandshops.manager.set: true commandshops.manager.set.owner: true commandshops.user.*: true commandshops.manager.add: description: Allows adding items to shops under player's management. commandshops.manager.create: description: Allows creation of shops. commandshops.manager.destroy: description: Allows destruction of shops under player's management. commandshops.manager.move: description: Allows relocation of shops under player's management. commandshops.manager.remove: description: Allows removal of items from shops. commandshops.manager.set: description: Allows setting of shop parameters such as pricing in shops under player's management. commandshops.manager.set.owner: description: Allows assignment of ownership of shops under player's management. commandshops.admin: description: Allows granting shops unlimited stock and money. Allows administrative access to override manager permissions. children: commandshops.manager.*: true default: op commandshops.free.create: description: Removes the cost associated with creating a shop. commandshops.free.move: description: Removes the cost associated with moving a shop. Config file: plugins/CommandShops/config.yml Code: limits: item-damage: 35 #Maximum damage% with which a shop will accept an item. Limit of 35 damage here means require at least 65% durability remaining. Needed because item damage is discarded when adding to stock. find-distance: 1500 #Block radius to include shops in "find" results. 0 = Unlimited shops-per-player: -1 #Maximum number of shops each player can have; Unlimited = -1 fees: create: 100.0 #Cost of creating a shop; 0 = free move: 10.0 #Cost of moving a shop; 0 = free log: limit: 500 #Maximum number of transactions saved in log per shop. notify-interval: 300 #Number of seconds between transaction notifications; 0 = Disable notifications size: max-height: 10 #Maximum custom shop height. max-width: 30 #Maximum custom shop width (both horizontal dimensions). storage: system: sqlite #Can be sqlite (file) or mysql (server) connect: #These params only needed if system = mysql host: localhost #Where the database server is located port: 3306 #Port number that the database server is listening on user: minecraft #Username to connect to the database server pass: password #Password to connect to the database server db: commandshops #Name of the database containing CommandShops data debug: false #Enable verbose debug output. custom-items: false #Use custom item set from items.yml. When False, CS will make its own items.yml with the vanilla items. Changelog: Version 4.1.0 Tested with CB 1.4.7 Added custom item support -- should be able to support modded items now as well as ad hoc updates to the item list Items updated for 1.4.7 and a few more snapshots. Some existing names changed to match official disambiguations. Permissions fix to allow denying manager.* while allowing user.* Log trim fix for MySQL mode Version 4.0.4 Tested with CB 1.3.1-R2 Simplified DB management to improve future DB support Updated items for 1.3.2 including snapshot items Added stub for WorldGuard integration but it has no functionality yet. Version 4.0.3 Tested with CB 1.2.5-R1.2 Fixed log overriding leaf detection for redwood Fixed leather detection Integrated SQLibrary 3.0.7 to fix "too many connections" issue Version 4.0.2 Fixed locale problem where commas were being inserted into numbers Version 4.0.1 Tested with CB 1.2.4-R0.1 Fixed MySQL 5.0 compliance Fixed price setting by id:damage getting overlooked Fixed detection for Jungle Sapling and Splash Potion of Fire Resistance Added new items Removed default shop size, all shops must be made with selections Changed browse and find output to be less likely to wrap Version 4.0.0 Tested with CB 1.2.3-R0.2 Updated for new event system Gave commandshops.user.* by default Made "select" ability implicitly granted by permissions for commands it is used with instead of separately Removed aliasing; now only command is "/shop" Switched to Vault for econ support Fixed many places where economy failure was interpreted as insufficient funds instead of actually checking the balance Remove references to bundles in documentation and in-game help Switched to SQL (both sqlite for convenience and mysql for power) using "PatPeter.SQLibrary" which may give us support for other DBs in the future. Remove concept of an item being "added" to a shop. Shops now independently have or not have an amount, buy price, and sell price for any item. You can now set buy and sell prices to 0. Set prices to NULL by running the set command with no number. Removed player data tracking system. Should improve performance. This unfortunately has removed player enter/exit messages. You can replicate this functionality with WorldGuard. Future work in this direction will likely be automatic WorldGuard integration. Commands now always check what shop you're in, so no more having to move around after warping to register that you're in a shop. Fixed bad help and error messages Even more compact and informative output Log everything - including shop management actions, not just transactions All permanent, non-thirdparty code now has full Javadoc coverage and no TODOs Version 3.6.2 Fixed search for blaze rod, glistering melon, fermented spider eye Removed bundle system. Prices should be divided automatically. Make backups, upgrade, then double check your prices before going live. Changed Register dependency to softdepend to get around long-standing Bukkit bug. Less correct but it works. Block faulty pricing (shop's buy price greater than sell etc) Added support for commonly spawned alternate non-legit versions of potions (as "Bootleg") so people stop complaining that "potions don't work!!111" when they find they can't add their normally-unobtainable potion. Stop letting shops with unlimited money collect revenue because it duplicated money Version 3.6.1 Admins can now move other players' shops Version 3.6 Tested with CB 1597 Switched to new Config class, as old became deprecated. No change for users. Improved item search, Redstone Repeater in particular should be easier to work with Fixed bad error "no item was (not) found" Added required damage value for some items to be found (e.g. Piston needs :7) Updated available items for Minecraft 1.0 including all potion types Default max stock for newly added items is now 10 instead of unlimited, for your protection Shops that don't appear in /find list (because they have no prices set) no longer count toward the number of shops shown Corrected "durable" status of leather armor Wrong durability calculation determined to be a Bukkit bug, removed special cases. Removed unused code. No more compiler warnings Added stock/max to "/shop find" Stop showing stock/max information when stock is unlimited "/shop search" with no params searches for item in hand Version 3.5.4 Fixed bug where transactions would fail based on seller's balance Improved error reporting Gave admins more power to meddle with shops (to better fit the existing description) Tested with CB 1317 Version 3.5.3 Added hard dependency on Register to alleviate dependency issues Avoid calling Register stuff in inappropriate cases Version 3.5.2 Change Register support to connect to the separate Register plugin instead of it being embedded Version 3.5.1 Moved to bukkit standard config file method; consolidated and categorized options. Now was the time to do it, before many people switch to this plugin. Enforce legit item stack limits Fixed misleading errors Fixed misleading comments and added javadoc for everything (10% done making it meaningful) Minor performance improvements. Removed UUID that was only used for reporting. Removed lots of unused code Fixed lazy limit indicator in "/shop find" Tested with CB 1240 Version 3.5 Forked from LocalShops 3.1 Economy support migrated to Register /shop browse *itemname* -- No more wading through 7 pages to see stock/pricing for a single item Always show buy/sell prices when possible, but warn if it can't be honored by showing price in red (instead of showing price as "--"). That is, only show "--" on error or when no price is set. Also, fixed maxstock-detection for find/browse. Changed Permissions support to SuperPerms Changed permissions to inheriting heirarchy. Set defaults same as LS' "Local Fallback Permissions" for zero-configuration usability. Removed usage reporting.