[ECON] ChestShop 3.42 (iConomyChestShop) - Chest&sign shop for economy plugins [1.2.5-R2]

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

     
  1. Offline

    Acrobot

    dev.bukkit.org profile:
    Acrobot
    My Plugins
    ChestShop - click to download


    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 =)

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

    For ChestShop 3:
    Bulgarian - Muff1Ncho
    Czech - hofec
    Danish - blasterweb
    Deutsch - Linaks
    Deutsch - Niklas4G
    Deutsch - cruzer0
    Deutsch (newest) - xGhOsTkiLLeRx
    Dutch - Lakloplak
    French- Chbrams
    Hungarian - Anachen
    Italian - Massimo1993
    Korean - Zwing87
    Polish - LeonidasPL
    Portugese(Brasil) - viruzinbr
    Slovenian - jEErc
    Spanish - xX_Lirianer_Xx
    Spanish - Croslicre
    Swedish - Maxell
    Traditional Chinese - hellboyincs


    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
    - @Epics for his great help
    :)

    If something's not working
    If you can both buy and sell, and your users can only buy, go to bukkit.yml and change spawn-radius to 0. 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]

    Version 3.42
    • Fixed stats page generation
    Version 3.41
    • Reformatted code
    • Switched from YamlConfiguration to BreezeConfiguration (from ChestShop 4)
    • Fixed getDouble()
    • Instead of checking for Admin Shops, we just pass in a new AdminShop Container
    • Created events for shop creation, protection checks and protection creation
    • Expanded string data value parsing, for example - you can use "Ocelot Monster" on the sign
    • Collected all external plugin wrappers in a single folder
    • Instead of using statics, now we use objects
    • Fixed enchantments for armour
    • Made config more readable
    • Added a setting for removing empty shops
    • Switched from System.out to logger
    • Also, switched from ugly file logging to Java's native one (FileHandler)
    • Added an option to tax transactions even when SERVER_ECONOMY_ACCOUNT is empty
    • Changed the Container interface
    Version 3.40
    • Now you can set a global max buy/sell price by adding "max-sell-price: 5" in the config. (Of course, same goes for buy price)
    • Changed the Metrics class to point to the new mcstats.org site
    • Removed BLOCK_UPDATE config option (which didn't work at all)
    • Changed message formatting, so instead of "You bought 1 STONE" you get "You bought 1 Stone"
    • Added WorldGuard container protection
    • Fixed chest protection bypassing bug
    • Added ALLOW_SIGN_CHEST_OPEN option to let server owners decide if they want players to be able to open chest's inventory by clicking on their shop sign
    • Added WORLDGUARD_USE_FLAG option to let server owners decide if they want to use the custom, but hacky WorldGuard flag (/region flag regionName chestshop allow/deny) or to just disallow building in the "wild"
    Version 3.39
    • Fixed chests in 1.2.3
    • Formatting
    • Warning about old Bukkit version
    • Renamed "TOWNY_CANNOT_CREATE_SHOP_HERE" to "CANNOT_CREATE_SHOP_HERE" to avoid confusion
    • Renamed "NOT_ENOUGH_LWC_PROTECTIONS" to "NOT_ENOUGH_PROTECTIONS" and changed its message
    • Fixed armour enchantments
    • Logging shop location
    • Fixed Heroes for the newest version
    • Removed redutant plugin object
    • Added dev-url for CraftBukkitUpToDate
    • Removed redutant plugins from softdepend
    • Fixed a bug when the player interacts with a shop with a sign in hand
    Version 3.38
    • Fixed an issue with LWC (defaulting to public protection)
    • Fixed an issue with admins not receiving the refund when destroying a shop
    Version 3.37
    • Added a warning if spawn-radius isn't set to 0
    • Deleted a few outdated plugins from built-in Register
    • System.out -> System.err for errors
    • Blocked buying if you're holding a sign in your hand (allows, for example, for sign editors to work)
    • Updated Heroes package
    • Fixed WG integration (no longer throws errors, but uses ugly workaround)
    • Fixed a small bug in Register plugin loading message
    • Removed version checking for OddItem, WorldGuard and LWC
    Version 3.35
    • Changed to the new, more robust event system
    • Added partial transactions (You have 5 items, shop wants 10 - you can sell your items for half the price)
    • Added a warning to the HTML generator
    • Fixed Towny integration
    • Fixed occasional ArrayOutOfBoundsExceptions
    • Fixed an error when a shop couldn't be created because a sign (not shop sign) was on other side of the block
    • Added SCL (SimpleChestLock) protection plugin to supported plugins
    • Updated Metrics (and added a new asynch thread for startup)
    • Removed Bukkit-1.0 workaround
    • Fixed plugin.yml formatting

    This post has been edited 139 times. It was last edited by Acrobot May 22, 2012 at 9:48 AM.
  2.  
  3. Offline

    Epics

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

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

    Acrobot

    dev.bukkit.org profile:
    Acrobot
    My Plugins
    @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 :)

    This post has been edited 1 times. It was last edited by Acrobot Feb 21, 2012.
  5. 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? ^_^
  6. Offline

    Acrobot

    dev.bukkit.org profile:
    Acrobot
    My Plugins
    @Epics
    Any player that can create a shop and place things in the region will be able to build there :)
  7. 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
  8. Offline

    HerobrineX

    yea im using Iconomy latest build
    And permissions latest build

    This post has been edited 2 times. It was last edited by HerobrineX Feb 21, 2012.
  9. 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
  10. Offline

    Epics

    What is the error?
    What version of iConomy?

    I recommend you convert from 3.x before R5 as it will be breaking.
  11. 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??
  12. Offline

    Acrobot

    dev.bukkit.org profile:
    Acrobot
    My Plugins
    @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
  13. Offline

    Epics

    Lovely, thanks.
  14. Offline

    badmacs

    @Acrobot
    Alright. I will do that, also, the error is attached. I believe this is the whole error.
  15. 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][/CODE][/LEFT]
    [LEFT] [/LEFT]
    The shop that generated this says:
    kcabbe
    1
    B 150
    Slime Ball
     
    Any ideas? Great plugin :)
     
    arachan.[/CODE][/LEFT]
  16. 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. :)

    This post has been edited 1 times. It was last edited by jacobsjov Feb 22, 2012.
  17. Offline

    Acrobot

    dev.bukkit.org profile:
    Acrobot
    My Plugins
    @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.
  18. 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.

    This post has been edited 1 times. It was last edited by HerobrineX Feb 22, 2012.
  19. 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. :)
  20. Offline

    Acrobot

    dev.bukkit.org profile:
    Acrobot
    My Plugins
    @HerobrineX
    Firstly - you get a totally different error, which basically says that the economy plugin wasn't loaded. Which chestshop version are you running?
  21. 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?
  22. Offline

    Acrobot

    dev.bukkit.org profile:
    Acrobot
    My Plugins
    @Epics
    You need
    plugins/ChestShop/HTML/row.html
    plugins/ChestShop/HTML/footer.html
    plugins/ChestShop/HTML/header.html

    :)
  23. Offline

    Epics

    17:14:40 [INFO] [ChestShop] You lack the necessary HTML files in your plugins/ChestShop/HTML folder!

    So, this is my folder...
    [IMG]

    Lies and slanter! xD
  24. Offline

    Acrobot

    dev.bukkit.org profile:
    Acrobot
    My Plugins
    @Epics
    I see something more :p
    You have two ChestShop folders, so you have:

    plugins/ChestShop - the folder where config is
    plugins/ChestShop/ChestShop - I have no clue what that is
    plugins/ChestShop/ChestShop/HTML - too many ChestShops :p You want the HTML folder in the same folder as your config :)
  25. Offline

    Epics

    So I need plugins/ChestShop/ChestShop/ChestShop? ;D just jokes! chestshop inception!
  26. Offline

    zmora

    something will hit me soon at times when trying to open the shop gives me You can not create this shop and downloaded the latest version of plugin:mad:
  27. Offline

    Epics

    Latest version is working fine for myself,
    Do you have the permission "ChestShop.admin"?
  28. Offline

    Acrobot

    dev.bukkit.org profile:
    Acrobot
    My Plugins
    @zmora
    If you're running PEX, downgrade to 1.17

    @Epics
    So, is it working now? :p
  29. Offline

    Hidri

    hey i have a problem

    user don´t have the permissions to buy from a chestshop

    but his i gave him the permissions correctly

    - CraftBukkit: 1.1-R4
    - ChestShop 3.34
    - economy: IConomy 6
    - PermissionEx v1.18
  30. Offline

    Etsijä

    Something fishy with latest (3.35) version of ChestShop: earlier on, we've had loads of "serverstore" type of server shops, which have no chest, only a sign like

    "serverstore
    1
    B 400:200 S
    diamond"

    They have worked just fine, with "serverstore" just being an "infinite" account which doesn't run out of money. In config.yml, we have always had
    SERVER_ECONOMY_ACCOUNT: "serverstore"

    Now, after 3.35 update, the "serverstore" started to actually run out of money. If I buy one diamond from it with 400 credits and sell 2 for 200 each and try to sell the third, I get "shop owner doesn't have anough money!"

    Now I'm sure this is something just plain wrong now in our configs, but can someone point me to the right direction? Thank you.
  31. Offline

    Acrobot

    dev.bukkit.org profile:
    Acrobot
    My Plugins
    @Etsijä
    Hmm... I guess that you had some other server_economy_account in the config.
    Either that, or you can delete the serverstore economy account.

    @Hidri
    Downgrade to PEX 1.17
  32. Offline

    Epics

    Well, all it seems to be reflecting is
    Code:
    <html>
    <head>
    </head>
    <body>
    <table>
    <thread>
    <tr>
    <th>Item</th>
    <th>Volume</th>
    <th>Bought</th>
    <th>Sold</th>
    <th>Stack size</th>
    <th>Price per stack</th>
    <th>Price per unit</th>
    </tr>
    </thread>
    <tbody><tr>
    <td>gold ingot</td>
    <td>20.0</td>
    <td>20.0</td>
    <td>0.0</td>
    <td>64</td>
    <td>256.0</td>
    <td>4.0</td>
    </tr><tr>
    <td colspan="7">Calculated in: 0.0 ms</td>
    </tr>
    </tbody>
    </table>
    </body>
    </html>

Share This Page