[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


    But my problem is i set a buy and sell. I can sell things to people but u cant buy them from them.
    Like in that example, i would like to buy dirt from people but when a player tries to sell it to me, nothing happens.
  3. Offline


    Your problem is exactly the same as silicon's
    Go into bukkit.yml and change spawn-radius to 0
  4. Offline


    Thank you acrobot. That helped to fix the problem.
  5. Offline


    I started to get spammed with the message below after I ran the "/lwc admin cleanup" command from the LWC plugin.

    I think that messed with your db a bit.

    2011-07-09 08:50:20 [SEVERE] javax.persistence.OptimisticLockException: Data has changed. updated [0] rows sql[delete from cs_transactions where id=? and buy=? and shop_owner=? and shop_user=? and item_id=? and item_durability=? and amount=? and price=? and sec=?] bind[null]
    2011-07-09 08:50:20 [SEVERE] at com.avaje.ebeaninternal.server.persist.dml.DmlHandler.checkRowCount(DmlHandler.java:123)
    2011-07-09 08:50:20 [SEVERE] at com.avaje.ebeaninternal.server.persist.dml.DeleteHandler.execute(DeleteHandler.java:81)
    2011-07-09 08:50:20 [SEVERE] at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.execute(DmlBeanPersister.java:105)
    2011-07-09 08:50:20 [SEVERE] at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.delete(DmlBeanPersister.java:67)
    2011-07-09 08:50:20 [SEVERE] at com.avaje.ebeaninternal.server.persist.DefaultPersistExecute.executeDeleteBean(DefaultPersistExecute.java:128)
    2011-07-09 08:50:20 [SEVERE] at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeNow(PersistRequestBean.java:535)
    2011-07-09 08:50:20 [SEVERE] at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeOrQueue(PersistRequestBean.java:557)
    2011-07-09 08:50:20 [SEVERE] at com.avaje.ebeaninternal.server.persist.DefaultPersister.delete(DefaultPersister.java:654)
    2011-07-09 08:50:20 [SEVERE] at com.avaje.ebeaninternal.server.persist.DefaultPersister.delete(DefaultPersister.java:464)
    2011-07-09 08:50:20 [SEVERE] at com.avaje.ebeaninternal.server.core.DefaultServer.delete(DefaultServer.java:1860)
    2011-07-09 08:50:20 [SEVERE] at com.avaje.ebeaninternal.server.core.DefaultServer.delete(DefaultServer.java:1845)
    2011-07-09 08:50:20 [SEVERE] at com.Acrobot.ChestShop.DB.Queue.run(Queue.java:22)
    2011-07-09 08:50:20 [SEVERE] at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    2011-07-09 08:50:20 [SEVERE] at java.lang.Thread.run(Thread.java:722)
  6. Offline


    When i try to buy, it says the owner doesnt want me to buy from their shop or something, we are both admins... any help?
  7. Offline


    Does anyone know how to get this plugin and BOSEconomy to play nice? I can't seem to create a functioning AdminShop because of the way BOSEconomy handles player accounts.
  8. Offline


    Yep, maybe
    If you're using default bukkit.yml database config - delete plugins/iConomyChestShop/iConomyChestShop.db
    Something is wrong with your 3rd line on the sign.

    What exactly doesn't work?
  9. Offline


    I can create an AdminShop, but when I try to sell to it, nothing happens. I also cannot specify an account to be the "Admin Shop" account because it appears that BOSEconomy requires all accounts to be tied to a player (unlike iConomy). I would like for my server's BOSEconomy bank account to function as the Admin Shop, but I cannot find a way to do this.
  10. Offline


    "but when I try to sell to it, nothing happens"

    Spawn protection :)
    Change spawn-radius in bukkit.yml to 0.

    For the second one - I'm sorry, I can't actually help you with that.
    You can disable linking admin shops to an account.
  11. Offline


    Sorry if this has allready been answered but is there a way to get shops to use a non player account? when i try it gives me an error 'Seller's account doesn't exist' and i know i'm typing in the account name right.
  12. Offline


    When i people try to buy or sell that said ''You don't have the permissions for that''

    But all is good :( Help ??

    I use permissions 3.1.6

            system: default
            default: true
                prefix: ''
                suffix: ''
                build: true
                - 'essentials.balance'
                - 'essentials.pay'
                - 'essentials.msg'
                - 'essentials.list'
                - 'essentials.help'
                - 'iConomyChestShop.shop.buy'
                - 'iConomyChestShop.shop.sell'
            default: false
                prefix: ''
                suffix: ''
                build: true
                - '*'  
  13. Offline


    And this is the users

            permissions: []
            - Admin
            permissions: []
            - Membre
            permissions: []
            - Membre
            permissions: []
            - Membre
            - Membre
  14. Offline


    Still no dice. Here's what happens when I try to sell:

    2011-07-09 16:35:13 [SEVERE] Could not pass event PLAYER_INTERACT to iConomyChestShop
        at org.bukkit.craftbukkit.CraftServer.getPlayer(CraftServer.java:180)
        at cosine.boseconomy.BOSEconomy.playerRegistered(BOSEconomy.java:419)
        at com.nijikokun.register.payment.methods.BOSE.hasAccount(BOSE.java:37)
        at com.Acrobot.iConomyChestShop.EconomyManager.hasAccount(EconomyManager.java:14)
        at com.Acrobot.iConomyChestShop.ShopManager.sell(ShopManager.java:69)
        at com.Acrobot.iConomyChestShop.ShopManager.transaction(ShopManager.java:32)
        at com.Acrobot.iConomyChestShop.iConomyChestShopPlayerListener.onPlayerInteract(iConomyChestShopPlayerListener.java:87)
        at org.bukkit.plugin.java.JavaPluginLoader$10.execute(JavaPluginLoader.java:307)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:321)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:168)
        at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:63)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:457)
        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:84)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
  15. Offline


    Wow, CraftBukkit fails here o.0

    Are you sure about the case of it? Names are case-sensitive.

    Maybe you're using ChestShop 3? (That's version 3 of my plugin)
    then :)
  16. Offline


    u cant create this kind of shop please help me, thx
  17. Offline


    You didn't add Permissions to your Permissions config.
  18. Offline


    Haha...is there anything I can do? I'm currently using iConomyChestShop 2.75. Would using 3.0b8 yield better results?
  19. Offline


    Ah thank you for your reply, Acrobot. Admin Chests save me tons of time!
  20. Offline


    Hmm.. You could try, or report it in BOSEconomy thread - they should know better than me :)

    No problem :)
  21. Offline


    yah, the case is right
  22. Offline


    I am early using win XP x32 system for server.
    Plugin working well. Now i am switch to LINUX and your plugin stop working.
    Trying 2.75, 3.0 ver. All time same error. Server crashing on start....
    Java 1.6.0_26

    14:23:28 [INFO] DataSourcePool [iConomyChestShop] autoCommit[false] transIsolation[SERIALIZABLE] min[2] max[20]
    # An unexpected error has been detected by Java Runtime Environment:
    # SIGFPE (0x8) at pc=0xb7ff150c, pid=6690, tid=744975280
    # Java VM: Java HotSpot(TM) Client VM (20.1-b02 mixed mode linux-x86)
    # Problematic frame:
    # C [ld-linux.so.2+0x89fc]
    # An error report file with more information is saved as:
    # /home/mc1/hs_err_pid6690.log
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    # The crash happened outside the Java Virtual Machine in native code.
    # See problematic frame for where to report the bug.

    I read temp fix by http://forums.bukkit.org/members/acrobot.8857/

    Just thought, that this may be a temporary solution:
    turn "useDB:" in config.yml to "false", so it looks like "useDB: false"

    Then, use WinRAR or something to unpack the .jar file and in plugin.yml delete the like that says "database: true".
    Then, put it back together to the .jar

    But better fix it guys please :)
  23. Offline


    GOT A bug for you. I put on a sign:
    <blank(it is blank))>
    B 2 : S 1
    298 <(btw that's leather cap)
    then make it when the items are already in the chest, but they don't dissapear!
    i have 8 leather caps in the chest. what's wrong?
  24. Offline


    is there a way to set up a shop with a non player account? i tried but i got 'Seller's account doesn't exist' and i know i spelt it right and the case is right. sorry to repost but i was kind of forgotten :p.
  25. Offline


    Just a thought but would it be possible to export the sign data and show a list of where they are all located? Something like:

    Meat B20:5S X,Y,Z (vapid2323)

    I think if we had the export we might be able to get the dynmap guys to integrate that into a map.

    PS I no nothing about plugin coding :)
  26. Offline


    I would use and admin shop for that, just put Admin Shop for the first line and the rest stays the same.
  27. Offline


    Hey I don'T know how one of my players did this but hes a normal user called "H_ercule_s" (maybe the _ mess something up)

    and his shop does not empty when you buy something
    the left chest sells 5 at once and there are only 44 string in the chest, i clicked 50 times and there are still 44 left in this chest...

    i copied both signs of him but with my name and the same amount of everything and item.

    my items got removed when somebody bought of it though...

    what did he do to have infinite items?

    Uploaded with ImageShack.us
  28. Offline


    i don't want to use the admin account for that because we want a set government amount of money
  29. Offline


    EDIT: Nevermind, I found my problem.
  30. Offline


    "Guys" :p
    I am one-person-team :D
    But it's not my fault :/
    I would repair it, but it's Bukkit's persistence problem, please report it on leaky.bukkit.org

    Have you tried ChestShop beta?

    Well... Not really.
    I do not store informations about where shop is stored.
    This might be possible however with DynMap, I'll see what I can do :)

    Nope. However, this might be possible if he has got an infinite item (somehow) in the chest. Check it with a new chest, with different items, but same material and amount?
  31. Offline


    yeah after destroying the chests, there were more string than the chest actually showed, it dropped 46 + 1+ 1 +1 +1 +1, after recreating them it worked, the same happened to his sulphur chests.

    I cannot imagine how he has gotten an infinite item though :S

Share This Page