[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

    jacobsjov

    I have activated the funcion "GENERATE_STATISTICS_PAGE".
    But what i get is a lot of console spam with this:
    Code:
    [Server] INFO [ChestShop] You lack the necessary HTML files in your plugins/ChestShop/HTML folder!
    And a .html file with no code in it at all.
    any idea?

    EDIT: Forgot to say that, i have tried to make the folder myself, but that doesn't chance anything.
     
  3. Offline

    HerobrineX

    I can make shops fine but whenever someone tries to buy or sell I get an error in the server console and nothing happens. Please help!
     
  4. Offline

    jacobsjov

    You should send your error message with that post. It's gonna be quite hard to help you without it :)
     
  5. Offline

    profipix

    This link:
    Code:
    http://dl.dropbox.com/u/11388037/Bukkit/R5iThink/ChestShop.jar
    does not work with R5.
    The original download in the thread give off the same error in cmd.
     
  6. Offline

    Acrobot

    jacobsjov
    Have you got the needed files in your plugins/ChestShop/HTML folder?

    profipix
    HerobrineX
    Could you explain it a bit more?
     
  7. Offline

    Kainzo

  8. Offline

    Acrobot

    Kainzo
    I feel a bit bad :/
    At the moment it can't be implemented, at least not in ChestShop.
    You can manually track who sold items to whom, but it would be extremely hard to add this now.
    I hope to start the work on CS4 soon, because Bukkit finally finished the changing from old system :)
     
  9. Offline

    Kainzo

    No Problem Acrobot - I was just passing on what the community was wanting. It'd be a nice feature but the data tracking behind that could get a little heavy under the current system.
     
  10. Offline

    Acrobot

  11. Offline

    HerobrineX

    ok when I try to buy it says this in the server console:
    17:49:47 [SEVERE] Could not pass event org.bukkit.event.player.PlayerInteractEvent to ChestShop
    org.bukkit.event.EventException
    at org.bukkit.plugin.java.JavaPluginLoader$103.execute(JavaPluginLoader.java:1026)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:61)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:460)
    at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:187)
    at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:283)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:609)
    at net.minecraft.server.Packet15Place.handle(SourceFile:39)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:100)
    at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:537)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:435)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.bukkit.plugin.java.JavaPluginLoader$103.execute(JavaPluginLoader.java:1024)
    ... 12 more
    Caused by: java.lang.NullPointerException
    at com.Acrobot.ChestShop.Economy.Economy.hasEnough(Economy.java:48)
    at com.Acrobot.ChestShop.Shop.Shop.buy(Shop.java:57)
    at com.Acrobot.ChestShop.Shop.ShopManagement.buy(ShopManagement.java:24)
    at com.Acrobot.ChestShop.Listeners.playerInteract.onPlayerInteract(playerInteract.java:81)
    ... 16 more

    And when I try and sell it says this:
    17:50:43 [SEVERE] Could not pass event org.bukkit.event.player.PlayerInteractEvent to ChestShop
    org.bukkit.event.EventException
    at org.bukkit.plugin.java.JavaPluginLoader$103.execute(JavaPluginLoader.java:1026)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:61)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:460)
    at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:187)
    at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:92)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:514)
    at net.minecraft.server.Packet14BlockDig.handle(SourceFile:43)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:100)
    at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:537)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:435)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)
    Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.bukkit.plugin.java.JavaPluginLoader$103.execute(JavaPluginLoader.java:1024)
    ... 12 more
    Caused by: java.lang.NullPointerException
    at com.Acrobot.ChestShop.Economy.Economy.addServer(Economy.java:36)
    at com.Acrobot.ChestShop.Shop.Shop.sell(Shop.java:169)
    at com.Acrobot.ChestShop.Shop.ShopManagement.sell(ShopManagement.java:35)
    at com.Acrobot.ChestShop.Listeners.playerInteract.onPlayerInteract(playerInteract.java:82)
    ... 16 more
    >
    >
     
  12. Offline

    Epics

    Lovely, thanks for your hard work. :)
    Feel better!

    I've done my best to take care of the tickets coming in!
     
  13. Offline

    Acrobot

    HerobrineX
    Are you using any economy plugin?

    Epics
    Really awesome :)
    Thank you :)

    I think it works now, if you want to test it, it's here:
    http://dl.dropbox.com/u/11388037/Bukkit/ChestShop.jar
    I am kinda "hax0ring" into WorldGuard, that's why it shows that it has loaded the regions two times - I hope it's not a problem. Also, the code should be reload-compatible, but when I tested, sometimes WorldGuard wasn't reload-friendly :)

    Just add a flag like:
    /region flag someRegion chestshop allow

    To allow shop creation :)
     
  14. Offline

    Epics

    Nothing should be reload compatible, yeesh.

    So, will players only with the permission be able to build in that region? Or will any player be able to build a shop in that region? ^_^
     
  15. Offline

    Acrobot

    Epics
    Any player that can create a shop and place things in the region will be able to build there :)
     
  16. Offline

    Epics

    So, if the user has
    ChestShop.shop.create
    & the region is set to chestshop he will be able to build?

    Wouldn't they be able to build shops there by default? xD
     
  17. Offline

    HerobrineX

    yea im using Iconomy latest build
    And permissions latest build
     
  18. Offline

    badmacs

    Hello, I'm getting an error when trying to buy/sell from admin shops

    bukkit version is 1.1-R4
    csversion is 3.35 (also, command for this doesn't seem to work??)
    I am using iConomy
    running Permissions 3.x
     
  19. Offline

    Epics

    What is the error?
    What version of iConomy?

    I recommend you convert from 3.x before R5 as it will be breaking.
     
  20. Offline

    badmacs

    the version of iConomy is latest I just updated it today.

    what I am getting is:
    [severe] could not pass event org.bukkit.event.PlayerInteractEvent to ChestShop

    Also, what should I convert to from 3.x??
     
  21. Offline

    Acrobot

    Epics
    Well, by default, the chestshop flag is set to "deny"

    badmacs
    That's not the whole error, I need more info.
    Also, Epics meant that you should convert from Permissions 3.x
     
  22. Offline

    Epics

    Lovely, thanks.
     
  23. Offline

    badmacs

    Acrobot
    Alright. I will do that, also, the error is attached. I believe this is the whole error.
     

    Attached Files:

  24. Offline

    arachan

    Hello, problem here. Some shops don't seem to work.

    - CraftBukkit: 1938
    - ChestShop: 3.5
    - Your economy plugin: iConomy
    - Permission plugin: Permissions 3.1.6
    Error is:​
    Code:
    08:03:22 [SEVERE] Could not pass event org.bukkit.event.player.PlayerInteractEvent to ChestShop[/LEFT]
    [LEFT]org.bukkit.event.EventException[/LEFT]
    [LEFT]        at org.bukkit.plugin.java.JavaPluginLoader$103.execute(JavaPluginLoader.java:1026)[/LEFT]
    [LEFT]        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:61)[/LEFT]
    [LEFT]        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:460)[/LEFT]
    [LEFT]        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:187)[/LEFT]
    [LEFT]        at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:92)[/LEFT]
    [LEFT]        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:514)[/LEFT]
    [LEFT]        at net.minecraft.server.Packet14BlockDig.handle(SourceFile:43)[/LEFT]
    [LEFT]        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)[/LEFT]
    [LEFT]        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:100)[/LEFT]
    [LEFT]        at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)[/LEFT]
    [LEFT]        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:537)[/LEFT]
    [LEFT]        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:435)[/LEFT]
    [LEFT]        at net.minecraft.server.ThreadServerApplication.run(SourceFile:465)[/LEFT]
    [LEFT]Caused by: java.lang.reflect.InvocationTargetException[/LEFT]
    [LEFT]        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[/LEFT]
    [LEFT]        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)[/LEFT]
    [LEFT]        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[/LEFT]
    [LEFT]        at java.lang.reflect.Method.invoke(Method.java:616)[/LEFT]
    [LEFT]        at org.bukkit.plugin.java.JavaPluginLoader$103.execute(JavaPluginLoader.java:1024)[/LEFT]
    [LEFT]        ... 12 more[/LEFT]
    [LEFT]Caused by: java.lang.NumberFormatException: empty String[/LEFT]
    [LEFT]        at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1012)[/LEFT]
    [LEFT]        at java.lang.Double.valueOf(Double.java:492)[/LEFT]
    [LEFT]        at com.iCo6.IO.mini.Arguments.getDouble(Arguments.java:58)[/LEFT]
    [LEFT]        at com.iCo6.system.Queried.getBalance(Queried.java:284)[/LEFT]
    [LEFT]        at com.iCo6.system.Holdings.getBalance(Holdings.java:22)[/LEFT]
    [LEFT]        at com.iCo6.system.Holdings.add(Holdings.java:55)[/LEFT]
    [LEFT]        at com.nijikokun.register.payment.forChestShop.methods.iCo6$iCoAccount.add(iCo6.java:111)[/LEFT]
    [LEFT]        at com.Acrobot.ChestShop.Economy.Register.add(Register.java:15)[/LEFT]
    [LEFT]        at com.Acrobot.ChestShop.Economy.Economy.add(Economy.java:26)[/LEFT]
    [LEFT]        at com.Acrobot.ChestShop.Shop.Shop.buy(Shop.java:90)[/LEFT]
    [LEFT]        at com.Acrobot.ChestShop.Shop.ShopManagement.buy(ShopManagement.java:24)[/LEFT]
    [LEFT]        at com.Acrobot.ChestShop.Listeners.playerInteract.onPlayerInteract(playerInteract.java:81)[/LEFT]
    [LEFT]        ... 17 more[/LEFT]
    [LEFT]
    The shop that generated this says:
    kcabbe
    1
    B 150
    Slime Ball

    Any ideas? Great plugin :)

    arachan.[/CODE][/LEFT]
     
  25. Offline

    jacobsjov

    As i stated, i needed to make that folder myself :)
    So no, the plugin never generated any files in it, and i haven't been able to fin any information on what it should contain.

    thx for replying. :)
     
  26. Offline

    Acrobot

    jacobsjov
    Well, the plugin doesn't create those files.
    You need them from a package, just grab the .zip file from BukkitDev/GitHub and in the folder you have "Sample files"

    arachan
    Sorry, that's iConomy's 6 error.

    badmacs
    No, unfortunately it isn't. If you're using Pail, you need to check server.log, as there the error should be saved.
     
    jacobsjov likes this.
  27. Offline

    HerobrineX

    Acrobot I think me arachan and badmacs are all having the same problem.
    Could there be a bug in chestshop? We all have the same permissions bukkit and chestshop versions.
     
  28. Offline

    jacobsjov

    Thanks. But a good idea would probably be to add that information in the config file where you enable it.

    And thanks for making this plugin, it's very appreciated. :)
     
  29. Offline

    Acrobot

    HerobrineX
    Firstly - you get a totally different error, which basically says that the economy plugin wasn't loaded. Which chestshop version are you running?
     
  30. Offline

    Epics

    Ah, Acrobat! So, I'm still getting the files missing errors. What files exactly need to be there for the stats page to be generated, kind sir?
     
  31. Offline

    Acrobot

    Epics
    You need
    plugins/ChestShop/HTML/row.html
    plugins/ChestShop/HTML/footer.html
    plugins/ChestShop/HTML/header.html

    :)
     

Share This Page