[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

    Acrobot

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

    Requirements:
    - An economy plugin supported by Register or Vault, for example iConomy, BOSEconomy or Essentials Eco.
    Optional:
    - 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


    Setup:
    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.

    Translations:
    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/


    Permissions:
    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:

    [​IMG]
    (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:
    [​IMG]

    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:
    [restricted]
    firstGroupName
    2ndGroupName
    3rdGroupName
    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)

    USING SHOPS
    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)

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

    STOCKING THE SHOPS
    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?

    [​IMG]
    Changelog (open)

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

    Kainzo

  3. Offline

    Smit80

    Im having a similar issue, When trying to buy from a shop:
    http://pastie.org/2065502

    And selling:
    http://pastie.org/2065518


    Additionally may I ask, As admin I could view the contents of other people chest shops, however I now get the message [Shop] You do not have permission to do that! Is there a way around this?
     
  4. Offline

    waluu

    Little problem here; I as an admin can use shops, but users get [Permissions] You can't buy/sell from shops!
    How is this fixed? I read about adding - iConomyChestShop.shop.use, am just not sure where to add that line.
     
  5. Offline

    waluu

    also, this is what I get in the server java thing

    Code:
    11:39:28 [SEVERE] Could not pass event PLAYER_INTERACT to iConomyChestShop
    java.lang.NoClassDefFoundError: com/nijiko/permissions/PermissionHandler
        at com.Acrobot.iConomyChestShop.PermissionManager.hasPermissions(PermissionManager.java:16)
        at com.Acrobot.iConomyChestShop.iConomyChestShopPlayerListener.onPlayerInteract(iConomyChestShopPlayerListener.java:47)
        at org.bukkit.plugin.java.JavaPluginLoader$10.execute(JavaPluginLoader.java:306)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:310)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:166)
        at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:63)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:453)
        at net.minecraft.server.Packet14BlockDig.a(SourceFile:42)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:399)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:309)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
     
  6. Offline

    Rossy

    Hey, I have a problem, I just updated to Bukkit #860 and I updated this plugin to 860 as well, but when I try to buy or sell from a shop, nothing happens. My money doesn't go up or down, and if I spam left click it still says "Wait!"
    Yes I have the permissions. I'm using Brohoster so I don't know of any error logs or anything, perhaps you could teamview me?
    This is my config.yml file:

    Code:
    reverseButtons: false
    sell: true
    distance: 1
    position: 'ANY'
    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. ANY for anything in radius of 1 block, other: goo.gl/YItRO
    #protection - Do you want to use built-in shop protection?
    
    LWCprotection: true
    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 stack all items in chest?
    
    useDB: true
    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 old the transation must be before being deleted? (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: false
    doNotRemoveSignIfNotCorrect: false
    serverAccountName: ""
    #separatingLineAfterTransaction - Do you want to show a line in the chat after transaction?
    #doNotRemoveSignIfNotCorrect - Do you want to keep the sign, if it's not correct?
    #serverAccountName - Account of the server to use with AdminShops, blank if you don't want to use one
    
    #Messages:
    showOutOfStock: false
    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.
    
    #MAXIMUM OF 55 CHARACTERS WITH PREFIX!
    
    #Experimental: Try changing the prefix to '                          &a[Shop] &f                                             '
    #The text will be centered!
    lang:
        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!"
     
  7. Offline

    ipie5

    Why do I keep getting this error?

    23:59:04 [SEVERE] Could not load 'plugins\iConomyChestShop.jar' in folder 'plugi
    ns':
    java.lang.ExceptionInInitializerError
    at org.bukkit.plugin.java.JavaPlugin.initialize(JavaPlugin.java:175)
    at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:174)
    at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
    java:194)
    at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:117)
    at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:109)
    at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:232)
    at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:219)
    at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:146)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:283)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException: Error
    constructing com.avaje.ebeaninternal.server.core.DefaultServerFactory
    at com.avaje.ebean.EbeanServerFactory.createServerFactory(EbeanServerFac
    tory.java:114)
    at com.avaje.ebean.EbeanServerFactory.<clinit>(EbeanServerFactory.java:5
    7)
    ... 10 more
    Caused by: java.lang.IllegalArgumentException: Error constructing com.avaje.ebea
    ninternal.server.core.DefaultServerFactory
    at com.avaje.ebeaninternal.api.ClassUtil.newInstance(ClassUtil.java:107)

    at com.avaje.ebeaninternal.api.ClassUtil.newInstance(ClassUtil.java:94)
    at com.avaje.ebean.EbeanServerFactory.createServerFactory(EbeanServerFac
    tory.java:112)
    ... 11 more
    Caused by: java.lang.RuntimeException: java.io.FileNotFoundException: C:\Users\I
    pie5\Desktop\bukkit\ItemCraft.jar (The system cannot find the file specified)
    at com.avaje.ebeaninternal.server.core.XmlConfigLoader.search(XmlConfigL
    oader.java:121)
    at com.avaje.ebeaninternal.server.core.XmlConfigLoader.load(XmlConfigLoa
    der.java:78)
    at com.avaje.ebeaninternal.server.core.DefaultServerFactory.<init>(Defau
    ltServerFactory.java:91)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstruct
    orAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingC
    onstructorAccessorImpl.java:27)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    at java.lang.Class.newInstance0(Class.java:355)
    at java.lang.Class.newInstance(Class.java:308)
    at com.avaje.ebeaninternal.api.ClassUtil.newInstance(ClassUtil.java:104)

    ... 13 more
    Caused by: java.io.FileNotFoundException: C:\Users\Ipie5\Desktop\bukkit\ItemCraf
    t.jar (The system cannot find the file specified)
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:127)
    at java.util.jar.JarFile.<init>(JarFile.java:135)
    at java.util.jar.JarFile.<init>(JarFile.java:99)
    at com.avaje.ebeaninternal.server.core.XmlConfigLoader.checkJar(XmlConfi
    gLoader.java:176)
    at com.avaje.ebeaninternal.server.core.XmlConfigLoader.search(XmlConfigL
    oader.java:110)
    ... 22 more
     
  8. Offline

    Acrobot

    @ShaDooM - probably other plugin is using Register
    @Smit80 - The second issue will be fixed shortly
    http://forums.bukkit.org/threads/ec...-economy-plugins-860.4150/page-94#post-378738
    Tl;DR - Other plugin using "Register" can make errors, I will do that error-proof soon.

    @ipie5
    Special character in your server path? Or some plugin that is incorrectly interferring?

    @waluu
    Are you sure you copied the .jar properly and then turned the server off and on?
    And not iConomyChestShop.shop.use, but iConomyChestShop.shop.buy

    @Kainzo
    Thanks, it seems like my item data value parsing fails :p
    Could you tell me what was on the sign, or you don't know?

    EDIT: NVM, I fixed that, uploading new version soon.
     
  9. Offline

    Kainzo

  10. Offline

    Acrobot

    @Kainzo
    Yeah, you know what was wrong?
    I didn't check if the material exists in the first place :)
     
  11. Offline

    ipie5

    I removed All my other plugins except for Iconomy but it still gave me the error
     
  12. Offline

    Kainzo

    Newbile mistake :D
     
  13. Offline

    Acrobot

    @ipie5
    Hmm, I guess it is caused either by special characters, or ItemCraft :/
     
  14. Offline

    Rossy

    So do you know why I can't buy or sell from a shop? Nothing happens when I try to buy/sell. And yes I have the permissions.
     
  15. Offline

    Acrobot

    @Rossy
    Errors in console?
    CraftBukkit version?
    iCS/CS version?
     
  16. Offline

    Rossy

    I posted most of that in another post on page 94 above ipie's post, I don't know if you didn't see it or not...
     
  17. Offline

    Acrobot

    @Rossy
    Oh yeah, sorry :(
    Could you PM me your teamViewer details?
     
  18. Offline

    Rossy

    @Acrobot
    No problem, I pmed you my details :p
     
  19. Offline

    Rossy

    500 Internets for you good sir :).
    Nice plugin of course, one of my favorite plugins :D (along with WorldEdit and Magicspells, so it's pretty damn good :p)
     
  20. Offline

    waluu

    @Acrobot
    [​IMG]

    That is what my plugins folder looks like
     
  21. Offline

    Acrobot

    @waluu
    Can you PM me your TeamViewer details?
     
  22. Offline

    Kainzo

    Security Exploit
    @Acrobot - for chestShop 3+
    I am getting reports that "All double chest shops are at risk"
    I'm guessing this means that one side is locked and the other isnt.

    You can access the other side of the chest not under the sign.
     
  23. Offline

    Acrobot

  24. Offline

    Kainzo

    @Acrobot - the test seems good - throwing it live.

    any shot at adding limits or max allowed? :p
     
  25. Offline

    waluu

    @Acrobot
    Teamviewer isnt working on my mac. The pic was taken on my fathers laptop, but things are the same.
     
  26. Offline

    Acrobot

    @waluu
    Okay, if not, please show me your Permissions folder, and your something.yml inside it (You know, permissions for the world)
     
  27. Offline

    TJstriker

    for some reason sell/buy doesnt work when i set it to the left mouse button, for example.
    when i have
    reverseButtons: False, Sell doesnt work.
    when i have it set to True, buy doesnt work, but sell does.
    if you could help me with this that would be awesome!
     
  28. Offline

    Acrobot

    @TJstriker
    Do you have sneakMode: true?
    Is the area on the spawn?
     
  29. Offline

    waluu

    @Acrobot
    [​IMG]
    What Yml file do you want to see?
     
  30. Offline

    Acrobot

    @waluu
    world - groups.yml
    and
    world - users.yml
     
  31. Offline

    TJstriker

    @Acrobot it is directly on top of the spawn, and i have sneakmode=True
     

Share This Page