[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

    ocomobock

    The latest one from BukkitDev.
     
  3. Offline

    Acrobot

    ocomobock
    Oh, also - is that a safe enchantment?
    (Which one, if you could tell?)
     
  4. Offline

    ocomobock

    I can't quite remember. I did enchant another one though. It has Smite VIII, and when I type /iteminfo, it says
    'Diamond Sword 276-5i'
    That didn't seem to work when I tried to make an admin shop of that item, so I tried to make it V instead of VIII, and that worked. Is 5 the maximum enchantment level or something?
     
  5. Offline

    eduardog3000

    Is it possible to make an Admin shop that actually does use a chest and have a limited stock? Basically, I want a way to buy items from players without the money going out of an actual player's account, but I still want the items to be added to the chest.
     
  6. Offline

    Acrobot

    ocomobock
    Hmm, at the moment the method I'm using lets you only safe enchant items, I will change that though.

    eduardog3000
    Just use a normal shop, but put something unique on the first line.

    Also, if you want to buy items for free, in the 3rd line:
    S free

    etc.
     
  7. Offline

    Jong

    Hi Acrobot, I am using:
    Chestshop 3.42
    CraftConomy 2.31 (needed for multiworld)
    Vault v1.2.15-b172
    PermissionsBukkit: v1.6

    I know CraftConomy has not been updated for 1.2.5, but in all other ways it seems to be working fine. However, people are unable to buy from shops when the user is not online. I get the following error:

    Code:
    2012-05-17 13:35:30 [SEVERE] Could not pass event PlayerInteractEvent to ChestShop
    org.bukkit.event.EventException
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:303)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:459)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:176)
        at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:287)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:636)
        at net.minecraft.server.Packet15Place.handle(SourceFile:39)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:113)
        at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:551)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:449)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
    Caused by: java.lang.NullPointerException
        at me.greatman.Craftconomy.Account.addMoney(Account.java:168)
        at net.milkbowl.vault.economy.plugins.Economy_Craftconomy.depositPlayer(Economy_Craftconomy.java:146)
        at com.Acrobot.ChestShop.Economy.Vault.add(Vault.java:14)
        at com.Acrobot.ChestShop.Economy.Economy.add(Economy.java:26)
        at com.Acrobot.ChestShop.Shop.Shop.buy(Shop.java:86)
        at com.Acrobot.ChestShop.Shop.ShopManagement.buy(ShopManagement.java:21)
        at com.Acrobot.ChestShop.Listeners.playerInteract.onPlayerInteract(playerInteract.java:85)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:616)
        at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301)
        ... 12 more
    Shop works fine when the user is online.

    I realise this might not be a fault in your plugin but you may understand the problem better than us! Any chance you could help. It is stopping us dead at the moment?

    Thanks

    Jon
     
  8. Offline

    Acrobot

    Jong
    Well, CraftConomy is failing here, I can't tell you more, as I don't know its code.
     
  9. Offline

    Jong

    oh! Hmm! Thanks
     
  10. Offline

    eduardog3000

    So anything that isn't "Admin Shop" or any username of someone on the server?
     
  11. Offline

    Acrobot

  12. Offline

    ady9000

    how to i get a currency on my server?
    P.S Great work!
     
  13. Offline

    VeryInsane

    I need an admin shop that gives away free Redstone.
    I tried three different ways I know how.


    Not working

    Also not working

    Again doesn't work
     
  14. Offline

    eduardog3000

    In line 3, just put "Free", nothing else.
     
  15. Offline

    Luc9986

    Hi there, sorry to bother you but I was just wondering if there is a way to allow other people to buy from your shops when claimed by another person's Faction, with the Factions plugin. I am not sure if the Towny integration will work for this, I just want to check, and if not, is there any way you can update it soon so it can do this? Thanks!
     
  16. Offline

    Jarek_fgdark

    why cant anyone buy or sell in the safezone or in any faction?? oh and now on factions it says an internal error has occured when i do /f leave plz help
     
  17. Offline

    Jong

    Just so you know, it seems it is CraftConomy's multi world support that is broken. Shame as that is one of its main selling points! But at least, if multiworld is turned off all works withou switching to a whole different economy system.
     
  18. Offline

    Acrobot

    Jong
    Thanks for telling :)
    I'll direct all other people with similar problems to your post :)

    VeryInsane
    It seems like 3.42 broke FREE signs, but you are creating them fine.
    I'll fix that soon.

    Jarek_fgdark
    I have no idea, why don't you ask it in the factions thread?

    Luc9986
    Well, there isn't any "factions" integration at the moment, sorry :/

    ady9000
    Download any economy plugin, such as BOSEconomy or iConomy.
     
  19. Offline

    Ruan

    Acrobot

    Code:
    2012-05-18 17:41:56 [SEVERE] java.util.ConcurrentModificationException
    2012-05-18 17:41:56 [SEVERE]    at java.util.ArrayList$Itr.checkForComodification(Unknown Source)
    2012-05-18 17:41:56 [SEVERE]    at java.util.ArrayList$Itr.next(Unknown Source)
    2012-05-18 17:41:56 [SEVERE]    at com.avaje.ebeaninternal.server.core.DefaultServer.save(DefaultServer.java:1764)
    2012-05-18 17:41:56 [SEVERE]    at com.avaje.ebeaninternal.server.core.DefaultServer.save(DefaultServer.java:1751)
    2012-05-18 17:41:56 [SEVERE]    at com.Acrobot.ChestShop.DB.Queue.run(Queue.java:25)
    2012-05-18 17:41:56 [SEVERE]    at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    2012-05-18 17:41:56 [SEVERE]    at java.lang.Thread.run(Unknown Source)
    We've had 189 of these errors hit the console since we installed the plugin 4 days ago.
    They occur when two transactions happen at once; which can be a player spam clicking or two different players trading at the same time. Due to the latter, this isn't fixable by a config option.

    It isn't a fatal error but it's annoying, as it happens over 50 times per day.
     
  20. Offline

    dude333dude333

    some people cant buy or sell stuff how do i fix it ! :confused: ?? :(
     
  21. Offline

    VeryInsane

     
  22. Offline

    Debesukaleejs

    Is there a way to prevent users use chest shops as LWC ? It would be nice if players once making the chestshop would be able to drop stuff in and not take out, or hold item and left kick the sign and it would go in the chest.
     
  23. Offline

    Al123456

    Screen Shot 2012-05-19 at 10.03.13 AM.png

    This is The Sign I am Pretty Sure its Correct I cant sell Or buy Still I dont know Why I hope You can Help
     
  24. Offline

    Luc9986

    I turned on Towny and suddenly it's working, so Towny integrations DOES work for Factions.
     
  25. Offline

    Acrobot

    Luc9986
    o.0

    I don't know - maybe Factions is disguised as towny? D:

    Al123456
    Looks fine. Can you post the EXACT error you get?

    Ruan
    Are you running ChestShop 3.42?
     
  26. Offline

    eddmann75

    How do you make a sign for colored wool and different colored wood?
     
  27. Offline

    Acrobot

    eddmann75
    Just do /iteminfo, it will tell you the ID, data value etc.
     
  28. Offline

    Al123456

    I Dont Get a Error Its just wont let me sell or buy
     
  29. Offline

    Pim1234

    does THIS still work?
     
  30. Offline

    Nickshelton80

    Hello,

    Players are able to burn chestshops if the sign is placed on wool. (This also happens with jungle logs)
    Bukkit Version: 1.2.5R1.0
    ChestShop Version: 3.42

    Thank you,
    Nickshelton80
     
  31. Offline

    Acrobot

    Pim1234
    Nah, the person who made this movie is, well..., stupid, and didn't realize he had OP/admin on the server...

    Al123456
    And any errors in console?

    Nickshelton80
    Hmm, ok, I'll check that, but can you update to 1.2.5R2.0?
    I suspect that the blockBreakEvent is just not fired when the wool is burned.
     

Share This Page