[ECON] ChestShop 3.7.18 (iConomyChestShop) - Chest&sign shop for economy plugins [1.8]

Discussion in 'Archived: Plugin Releases' started by Acrobot, Feb 12, 2011.

  1. Offline


    An easy way to create shops - no protection plugin needed!
    You don't need to be on-line to earn money anymore!
    I've put a LOT of effort into making this plugin,
    you can donate if you appreciate my effort =)

    - An economy plugin supported by Register or Vault, for example iConomy, BOSEconomy or Essentials Eco.
    - For additional economy plugin support - Vault
    - For Permissions: bPermissions, PEX, or any other permission plugin
    - For additional protection: LWC, Lockette, Deadbolt
    - For other item names (aliases): OddItem

    Copy the .jar file from the .zip you downloaded into /plugins folder.
    You can also copy the example files if you want to generate statistics page.

    You can change the plugin's language, here's a list of all user-made translations.
    If you want to update or submit a translation, feel free to PM me.
    Translations (open)

    Arabic - Attarhsase2
    Bulgarian - Muff1Ncho
    Czech - LordPgsa
    Chinese (Simplified) - tab415263
    Danish - Cannafix
    Dutch - speedlegs
    French- DragonSlayer875
    German - RasCas
    Hungarian - Anachen
    Indonesian - Yahya98
    Italian - Massimo1993
    Korean - Zwing87
    Norwegian - _AlexN_ and TheUnkownGamer
    Polish - Holls1
    Portugese (Brasil) - FelipeMarques14
    Russian - VADemon from http://minemania.ru/
    Slovak - LordPgsa
    Slovenian - jEErc
    Spanish - thxaaaa
    Swedish - Maxell
    Turkish - Developer
    Traditional Chinese - hellboyincs
    Vietnamese - etrubi1 from http://minevn.com/

    How to create a ChestShop?
    - Place a chest, if you haven't already.
    - Place a sign 1 block near the chest (for example, above the chest)
    - On the sign, write:

    (Item name can actually be item ID or alias)
    First line will be filled in by the plugin automatically.
    Price is a combination of buy and sell price.
    You have to have B near buy price (people buy from you), and S near sell price (people sell to you).
    If you have both B and S, separate them with a colon - :
    For example:

    means that AcrobotPL wants to sell 64 diamonds for 10 currency, and buy them back from you for 5 currency.
    Also, if you put "free" instead of price, it is free to buy or sell :)

    - Now, when you finish editing the sign, if LWC is turned on in config, shop will be automatically created.
    Also, if your default protection is turned on in the config, people won't be able to break chest, sign or the block the sign is on.

    What is an Admin Shop?
    Admin shop is the shop that doesn't require a chest, because it has infinite stock.
    If you sell to it, the items will disappear, and if you buy from it, items will magically appear.
    To create one, you have to be Admin/OP. Just put "Admin Shop" (or anything specified in config file) on the first line of the sign.

    Restricting shops to some groups or regions
    You can either use permissions, or you can just put a sign ABOVE shop sign (you need to be in that group to create the sign) to restrict it to players with ChestShop.group.groupName permission
    The syntax is:
    Only those groups will be able to use that shop

    To restrict a shop to some regions:
    - If you're using Towny, turn TOWNY_INTEGRATION on. Residents will be able to create shops in economy plots (either their or, if specified in config, any)
    - If you're using WorldGuard, you can use an experimental "chestshop" flag. Turn WORLDGUARD_INTEGRATION on and flag a region. (f.e. /region flag ChestShopRegion chestshop allow)

    Do you want to limit the maximum prices for items?
    Well, there's an app.... wait, not that : P
    You can use an experimental feature in ChestShop.
    In your config.yml, add lines like:
    max-buy-price-5: 14
    max-sell-price-5: 15

    That means that the maximum price for items BOUGHT by PLAYER is 14, and items SOLD by PLAYER using the shop is 15.

    You can also use a global setting, like this:
    max-sell-price: 200

    That means that the maximum price for items SOLD to PLAYER is 200 (if there is, for example, a max-sell-price-5 found, it will be used instead of the global sell price)

    You could buy and sell by right and left clicking the sign for a long time.
    Now it's the only way to use the shops.
    It's SIMPLE!
    Just LEFT-CLICK to SELL to shop, and
    RIGHT-CLICK to BUY from shop.
    (This can be changed in the config file)

    If you want to delete your old shop, simply SNEAK and destroy the sign.
    It's that easy =)

    You can either open the chest and stock it up, or click on your own sign - it will open chest's inventory (that way you can have chests not openable by other people for sure :D)

    ItemInfo command
    It's a simple command that shows item information.
    If you use it without any arguments, it shows you information about the item you're holding.
    If you specify item id or item name after the command, it will show you information about that item.

    Source code
    ChestShop is Open-Source =)
    You can find its code on https://github.com/Acrobot/ChestShop-3

    Thanks to:
    - kali876, ziomekYOYO and Herocraft server for testing the plugin and finding every little bug =)
    - Everyone who uses this plugin - really big thanks for this, I never thought it will be so popular
    - Everyone who provided translation - many people's lives will be easier now
    - @Nijikokun for Register
    - @LennardF1989 for awesome Persistence Reimplemented
    - @Temaska for fixing the plugin while I was on holidays
    - @VADemon for providing a great support for other users
    - @Euthyphro for his patience and really good bug spotting
    - vagrant326 for making a great price sheet
    - Epics for his great help
    If something's not working
    You can't change the sign color - that breaks the formatting.
    If that's not the issue, please give me this information, so I can help you faster.
    - CraftBukkit version (type /version in chat)
    - ChestShop version (type /csversion in chat)
    - Your economy plugin (iConomy? BOSEconomy? other one?)
    - Have you got any Permission plugin? Which one?

    Changelog (open)

    Changelog can be found on BukkitDev - http://dev.bukkit.org/server-mods/chestshop/files/
  2. Offline


    Does the new version have a webserver embedded to serve the /html page?

    And is there a version that will work with iConomy 4.6.5?

    I played around on my pc testing it out, working good :) I'm really happy you added this ha.
  3. Offline


    The HTML - No, it generates a file - plugins/iConomyChestShop/ChestShop.stats.html
    You can use a script then to copy it into your webserver.

    Nope, no version for iConomy 4.6.5 - why won't you use 5? It works with 4.6.5 DB's!
  4. Offline


    when i want to click on the sign theres : iconomychestshop no economy plugin found...
    but i ve installed iconomy and /money works plz
  5. Offline


    I bet you have iConomy 4.6.5
    Download iConomy 5.
    MyGameforce likes this.
  6. Offline


    Ah ok, I was just wondering.

    We will probably have a script that populates the .db file into a MySQL and then pull it with a php file. I don't have a web server running on the server machine, and want to avoid running one lol

    I'm pretty good about having all the latest plugin versions, but the reason I haven't switched to iConomy5 yet is because I am waiting for Towny and ecoCreatures to work with it. No biggie though, I played with the new version on my own computer at home as a test server and it's looking great :) Thank you again!

    I think this will change how shops are set up on the servers, at least it will for me. I am getting rid of the main "server shop" once this is working. This will help players to set prices that aren't too low or too high, then supply and demands should take over.
  7. Offline


    You can configure database in bukkit.yml in your server directory. Just change the driver and path to MySQL one.

    And thanks for support :)
    imaxorz likes this.
  8. Offline


    I never realized that was there...

    Is there any documentation on this anwhere?
  9. Offline


    I have no clue, it's bukkit's. You have to nag the dev's to provide documentation :)
    But I guess you have to change driver to:
    and URL to your MySQL database URL, for example:
  10. Offline


    Haha I don't think I'll get anywhere nagging them.

    Yeah we got that far :)

    So now it will just look for .db files in plugin folders, and just automatically populate them into a MySQL?
  11. Offline


    It will now automatically populate MySQL instead of default SQLite :)
  12. Offline



    Thank you very much!
  13. Offline


    Hey still looking for an answer to this please. :)
  14. Offline


    Oh, I'm sorry, I forgot.
    It's now implemented.
    Just create an account named "AdminShop" (as economy plugins don't like spaces in names) and then create shops using that name. It will use "AdminShop" account then, and it will have unlimited stock!
  15. Offline



    18:02:06 [INFO] This server is running ←[32mCraftbukkit←[37m version ←[32mgit-Bu
    kkit-0.0.0-706-gf53e007-b740jnks (MC: 1.5_02)←[0m
    18:02:06 [INFO] This server is also sporting some funky dev build of Bukkit!←[0m


    reverseButtons: false
    sell: true
    distance: 1
    position: 'DOWN'
    protection: true
    #reverseButtons - If true, people buy with left click and sell with right click.
    #sell - Do you want to let people create/use shops, that buy things from players?
    #distance - Distance between the chest and the sign. (Warning, chests that aren't exactly that far WON'T work as shops)
    #position - Position of the chest, relative to the sign. goo.gl/YItRO
    #protection - Do you want to use built-in shop protection?
    LWCprotection: false
    signLWCprotection: false
    #LWCprotection - Do you want to protect the chests with LWC?
    #signLWCprotection - Do you want to protection signs with LWC? (Warning, gives LWC message when using shop!)
    log: true
    logToFile: false
    logFilePath: "plugins/iConomyChestShop/iConomyChestShop.log"
    #log - Do you want to log transactions and shop creating?
    #logToFile - Do you want to save the log to file? (Warning, this lags a bit - I reccomend turning this off, as server.log will have these informations too.)
    #logFilePath - Path to log file.
    sneakMode: true
    allowUsedItemsToBeSold: false
    stackUnstackableItems: false
    #sneakMode - Do you want to let people to shop using left mouse button, and destroy the shop signs when sneaking?
    #allowUsedItemsToBeSold - Do you want to let people sell used tools to the shop? (Warning, the tools will be "fresh" if player sells them. NOT RECCOMENDED)
    #stackUnstackableItems - Do you want to use the default MinecartMania's chest behavior? (Warning, stacks food/etc. NOT RECCOMENDED)
    useDB: false
    howLongToStoreInformationInDB: 600
    intervalBetweenTransactions: 100
    #useDB - Do you want to use bukkit's built-in database to log the transactions? (Must be turned on, if you want to generate price list)
    #howLongToStoreInformationInDB - How long do you want to store information about transactions in database? (In seconds)
    #intervalBetweenTransaction - How often can one person buy or sell to the shop? (In miliseconds: 1000ms = 1 sec)
    generateTransactionList: false
    intervalBetweenGeneratingTransactionList: 5
    showUnusedItemsInGeneratedList: false
    #generateTransactionList - Do you want to generate average price, amount of bought, sold items page? (Currently in ALPHA state)
    #intervalBetweenGeneratingTransactionList - Interval between generating the list. (In seconds)
    #showUnusedItemsInGeneratedList - Do you want to show items, that were not bought/sold on the list?
    separatingLineAfterTransaction: true
    #separatingLineAfterTransaction - Do you want to show a line in the chat after transaction?
    showOutOfStock: true
    showMoneyAfterTransaction: true
    #showOutOfStock - Do you want to show "Out of stock" messages?
    #showMoneyAfterTransaction - Do you want to show your balance after transaction?
    # If you want to translate this file, do it yourself, or copy the "lang:" part from another translation.
    # Prefix will be dispayed at the beggining of every message.
    # You can use terms like <buyer>, <amount> or <item> in messages, however
    # only certain messagess offer this.
    # <buyer> - nick of the person who bought from shop.
    # <seller> - nick of the person who sold to shop.
    # <owner> - nick of the person who own the shop.
    # <amount> - amount of item
    # <item> - name of item
    # <money> - amount of money with iConomy currency
    # <cost> - cost of the item
    # You can always use hMod colors, like
    # &1, &f etc...
    # For example: This is my&6 golden text.
    #Experimental: Try changing the prefix to '                          &a[Shop] &f                                             '
    #The text will be centered!
        prefix: '&a[Shop] &f'
        Somebody_sold_items_to_your_shop: '<seller> sold <amount> <item> for <cost> to your shop!'
        Somebody_bought_items_from_your_shop: '<buyer> bought <amount> <item> for <cost>!'
        Your_shop_is_out_of_stock: 'Your <item> shop is out of stock!'
        You_cannot_use_your_own_shop: "You can't use your own shop!"
        You_bought_items: 'You bought <amount> <item> from <owner> for <cost>.'
        Your_inventory_is_full: 'Your inventory is full!'
        You_have_got_not_enough_money: "You don't have enough money!"
        Shop_is_out_of_stock: 'This shop is out of stock!'
        You_have_not_enough_items: 'You have not enough items to sell!'
        You_sold_items: "You sold <amount> <item> for <cost> to <owner>'s shop."
        Chest_is_full: 'This chest is full!'
        Seller_has_not_enough_money: "Seller has not enough money!"
        Seller_has_no_account: "Seller's account doesn't exist!"
        No_selling_to_this_shop: "Shop owner doesn't want you to sell here!"
        No_buying_from_this_shop: "Shop owner doesn't want you to buy here!"
        Your_balance: 'After transaction you have <money>.'
        Shop_is_created: 'Your shop has been successfully created!'
        Shop_cannot_be_created: "You have no chest set up!"
        Shop_was_LWC_protected: "Your shop was successfully protected with LWC."
        Mode_changed_to_sell: 'Mode set to selling!'
        Mode_changed_to_buy: 'Mode set to buying!'
        You_tried_to_steal: "Don't steal!"
        wait: "&4Wait!"
        iteminfo: "&aItem ID and names:"
        incorrectID: "Incorrect item ID!"
        Couldnt_fit_on_sign: "Couldn't fit something on the sign!"
        Negative_price: "Can't make shop with negative buy/sell price!"
        Incorrect_item_amount: "The item amount you specified is invalid!"
    18:03:24 [SEVERE] ebean.properties not found
    18:03:24 [INFO] DataSourcePool [iConomyChestShop] autoCommit[false] transIsolati
    on[SERIALIZABLE] min[2] max[20]
    18:03:24 [INFO] SubClassFactory parent ClassLoader [org.bukkit.plugin.java.Plugi
    18:03:25 [INFO] Entities enhanced[0] subclassed[1]
    17:56:35 [INFO] [iConomyChestShop] version 2.6 initialized!
    17:56:35 [SEVERE] Could not pass event PLUGIN_ENABLE to iConomyChestShop
    java.lang.NoClassDefFoundError: com/iConomy/iConomy
            at com.Acrobot.iConomyChestShop.iConomyChestShopPluginListener.onPluginE
            at org.bukkit.plugin.java.JavaPluginLoader$34.execute(JavaPluginLoader.j
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
            at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader
            at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManage
            at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:116)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:94)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Caused by: java.lang.ClassNotFoundException: com.iConomy.iConomy
            at java.net.URLClassLoader$1.run(Unknown Source)
            at java.security.AccessController.doPrivileged(Native Method)
            at java.net.URLClassLoader.findClass(Unknown Source)
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
            at org.bukkit.plugin.java.PluginClassLoader.findClass(PluginClassLoader.
            at java.lang.ClassLoader.loadClass(Unknown Source)
            at java.lang.ClassLoader.loadClass(Unknown Source)
            ... 13 more
    Not sure if the first error is part of ChestShop but I hadn't gotten it before until I updated to 2.6, I just ran the console and this is what I got.
  16. Offline


    Many people will have that now :/
    You have old iConomy. If you want to still have it, wait a while, I'll post a version for 4.6.5

    Also, look at the reply above :)

    EDIT: Ok, updated. Thanks for report though!
  17. Offline


    Sweet thank you! But I do have a problem to report.
    I get this error below. I've also gotten it when testing on my computer with iconomy5 and matching version of the shop. I just figured it was because I didn't have mysql installed on my pc at home, but I get it on the server too.
    Show Spoiler

    2011-05-04 17:50:43 [SEVERE] ebean.properties not found
    2011-05-04 17:50:43 [SEVERE] Could not load 'plugins/iConomyChestShop.jar' in folder 'plugins':
    javax.persistence.PersistenceException: Problem loading Database Driver [driver=com.mysql.jdbc.Driver]: driver=com.mysql.jdbc.Driver
    at com.avaje.ebeaninternal.server.lib.sql.DataSourcePool.initialise(DataSourcePool.java:234)
    at com.avaje.ebeaninternal.server.lib.sql.DataSourcePool.<init>(DataSourcePool.java:208)
    at com.avaje.ebeaninternal.server.lib.sql.DataSourceManager.getDataSource(DataSourceManager.java:210)
    at com.avaje.ebeaninternal.server.lib.sql.DataSourceGlobalManager.getDataSource(DataSourceGlobalManager.java:63)
    at com.avaje.ebeaninternal.server.core.DefaultServerFactory.getDataSourceFromConfig(DefaultServerFactory.java:427)
    at com.avaje.ebeaninternal.server.core.DefaultServerFactory.setDataSource(DefaultServerFactory.java:388)
    at com.avaje.ebeaninternal.server.core.DefaultServerFactory.createServer(DefaultServerFactory.java:168)
    at com.avaje.ebeaninternal.server.core.DefaultServerFactory.createServer(DefaultServerFactory.java:64)
    at com.avaje.ebean.EbeanServerFactory.create(EbeanServerFactory.java:78)
    at org.bukkit.plugin.java.JavaPlugin.initialize(JavaPlugin.java:175)
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:140)
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:160)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:108)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:85)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    Caused by: java.lang.ClassNotFoundException: driver=com.mysql.jdbc.Driver
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at com.avaje.ebeaninternal.api.ClassLoadContext.forName(ClassLoadContext.java:73)
    at com.avaje.ebeaninternal.api.ClassUtil.forName(ClassUtil.java:53)
    at com.avaje.ebeaninternal.server.lib.sql.DataSourcePool.initialise(DataSourcePool.java:232) ... 18 more


    username: root
    isolation: SERIALIZABLE
    driver: driver=com.mysql.jdbc.Driver <--I've tried without "driver=" too
    password: xxxxxxxxxx
    url: jdbc:mysql://localhost:3306/minecraft"
  18. Offline


    Thanks for posting the 4.6.5 version :) I tried updating iConomy to 5.0 but I have a few other plugins that use iConomy so I got spammed with errors... *facepalm* Ended up downgrading to fix it. :p
  19. Offline


    If I remove this plugin so I can edit signs with SpeedSign, will the signs work when I add it back? (I assume they would, but it's better to be safe than sorry.)
  20. Offline


    Whenever I try to create a shop it says:
    "Your shop was successfully protected with LWC."
    "Your shop has been successfully created!"
    I even get a successful output in the server log.

    But then the sign is blank and interaction does nothing but tell me that the sign is protected.

    I'm using iConomy 5, newest version of iConomyChestShop, CB740, you know, what you'd expect.
    Permissions is in use with the .shop.create & .shop.create.* as well as .shop.buy and .shop.sell all listed for Default group.

    (To re-iterrate) I can't get a shop to work, and I'm not getting any errors.

    Edit: On an added note, I seem to be having a conflict between Essentials' "shop" or "trade" signs and iConomyChestShop signs.

    Will test this further tomorrow.
  21. Offline


    Can someone make a tutorial on how to use the "market price" thing. I'm setting up a new server and i want to make the prices fair.

    Does the plugin allow for auto update prices?
  22. Offline


    Great plugin Im wondering though if were using lockette and not lwc if we set the lwc settings to true does it work with lockette aswell?
  23. Offline


    I was thinking if you where able to make it so When you put a sign intop of the BUY/SELL sign it does LINE 1 : [STOCK] Line 2: It shows the cuurent stock available AUTO Line 3: Shows What Stock NAME NOT ID and Line 4: Says INSTOCK or OUTOFSTOCK

    Also it would be nice if the First Line is [Buy] Then ITEM NAME *Can Be Blank* Then QUantity Then the Price :D Also the Buy can be changed to [Sell] [Buy] [Give] <-- FREE FOR GIVE
  24. Hi Acrobot, do you think it's possible to add the possibility to set min and max prices for single Items in the config?
    It would be really nice.
    For example:
    log.min = 0.99
    log.max = 1.76
    log = 0.99:1.76
    or somehow else.
  25. Offline


    Terra-Network.org likes this.
  26. Wow that would be .... i can't explain how it would be :D
  27. Offline


    Anychance you could make it so it can be at "ANY" position?

    So we could set it up to be at more than just DOWN or, say, EAST, but maybe DOWN, and at it's level (so North east south west)
  28. Offline


  29. Offline


    I like this idea but what if you could actually link
    the sign shop with a chest in a random place.
    It could be similar to the lwc protection were
    after you make the shop you go and punch the
    chest you want to link to the sign
  30. Offline


    Alright, further breakdown:

    I can create player oriented shops (self-stocked) and they work perfectly.
    When I try to make an admin shop
    The sign goes blank and all output from this action is positive (no errors, and everything says a shop was created, etc...)
    This blank sign allows no interaction from me or players.

    Same thing when the top line reads "Admin Shop" as well.

    I tried making a /money create AdminShop and that changes nothing.

    Am I doing something wrong?
  31. Offline


    Are you an admin? If not it wont work.

Share This Page