[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

    Wyrd

    Hey Acrobot, I'm having a problem on my server. When anyone buys/sells an item to a shop, it puts/takes the item out of the shop but doesnt give/take items from the players inventory. It does affect the players balance though.

    Also, when I buy or sell i get this in terminal:


    11:43:41 [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:441)
    at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:168)
    at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:285)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:722)
    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:116)
    at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:554)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
    Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 0
    at java.util.ArrayList.RangeCheck(ArrayList.java:547)
    at java.util.ArrayList.get(ArrayList.java:322)
    at com.iCo6.util.Common.formatted(Common.java:125)
    at com.iCo6.iConomy.format(iConomy.java:504)
    at com.nijikokun.register.payment.forChestShop.methods.iCo6.format(iCo6.java:39)
    at com.Acrobot.ChestShop.Economy.Register.format(Register.java:32)
    at com.Acrobot.ChestShop.Economy.Economy.formatBalance(Economy.java:56)
    at com.Acrobot.ChestShop.Shop.Shop.buy(Shop.java:98)
    at com.Acrobot.ChestShop.Shop.ShopManagement.buy(ShopManagement.java:28)
    at com.Acrobot.ChestShop.Listeners.playerInteract.onPlayerInteract(playerInteract.java:80)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301)
    ... 12 more
    >
     
  3. Offline

    VADemon

    MrGKanev
    I guess you have to setup global permissions or add chesthop permissions to that world
    Wyrd
    Tell also which version of ChestShop/CraftBukkit you're running!
     
  4. Offline

    Wyrd

    I'm running ChestShop on v3.38 and CraftBukkit on 1.2.3-R0.2
     
  5. Offline

    Acrobot

    MrGKanev
    "can't buy or sell"?
    What do you mean by that?

    Wyrd
    Your iConomy 6 fails. Try deleting plugins/iConomy/config.yml
     
    Wyrd likes this.
  6. Offline

    DrNoD

    @ Acrobot:
    Thank you for your quick answer. I checked it myself.
    Bukkit: works
    Bukkit++ the error i described.

    Then i will have to look :)
     
  7. Offline

    kayc01

    i did and still nothing :(
    i really dont kno why.. could it be old lwc ? so lwc is out of date? or iconamy. but i only downloaded it other day.
    thx for any help
     
  8. Offline

    Wyrd

    Ah, that worked. Thanks a lot :)
     
  9. Offline

    Acrobot

    kayc01
    Well, I told you - your iConomy is broken, not LWC. Did you delete the config?
     
  10. Offline

    MrGKanev

    I mean that if the sigh is just sell i dosen't work but i sends the mesega that it cant sell here...
     
  11. Offline

    Acrobot

    MrGKanev
    "You can't sell here" = your 3rd sign line is wrong. It should be either:

    B 5
    S 5
    B 5:5 S
     
  12. Offline

    kayc01

    yes the hole folder for safe measure. restarted server and nothing.
    i might try reinstall chest shop and economy.. i be back with results
     
  13. Offline

    Wergio

    Hello! I did not understand English. and use it to communicate with you Google translator.
    Could you tell me why this plugin works even when there is no such ChestShop.shop.create - lets you create shop Permissions permissions.
     
  14. Offline

    Mistercmd

    Does this plugin work with iconomy
     
  15. Offline

    kayc01

    hmm still nothing for me. after re-install of iconomy6 and chest shop. still you can not sell here and well who it is protected by. i restarted the server. making me mad lol.
    hmm what else can it be..
    and i agree it looks like an iconomy error : u kno best
    but after reinstall should that not fix it?
     
  16. Offline

    Mistercmd

    Cause if it does I'll get it
     
  17. Offline

    Mistercmd

    Just opened my server yesterday and only 1 half of all the plugins I loaded worked so just chexking
     
  18. Offline

    kayc01

    tell me ip.. i can help you with the server. private msg me it.
     
  19. Offline

    Acrobot

    Mistercmd
    Yep. It's original name was "iConomyChestShop"

    Wergio
    Well, you have to use negative nodes.
    In bPerms you should do:
    ^ChestShop.shop.create

    in PEX:
    -ChestShop.shop.create.*

    kayc01
    Try using BOSEconomy.
     
    Wergio likes this.
  20. Offline

    Wergio

    Acrobot Sorry, but I would say the following.

    This plugin works even if there is no plug-in permission.

    And it is not possible to forbid users to evacuate store.

    Sorry for my mistakes. Use google translate.
     
  21. Offline

    Acrobot

    Wergio
    Hmm...
    Yeah, the plugin works when there's no permissions plugin.
    If you want to disallow people to create shops without permission plugin, open ChestShop.jar with WinRAR/7Zip, open plugin.yml and change "default: true" to "default: ops"
     
  22. Offline

    MrGKanev

    But in some things i dont want to sell so i dont wrhite enithing like:
    Name of the shop
    61
    B 24
    Diamonds
    I uset it before but i update it and i dosent work now ...
     
  23. Offline

    Acrobot

    MrGKanev
    Hmm, it's just right.
    What error exactly do you get?

    Also, it might be a WorldGuard "problem".
    Is your WORLDGUARD_INTEGRATION turned on?
    If so, did you do /region yourRegion flag chestshop allow?
     
  24. Offline

    MrGKanev

    Thats the dume thing no error nothing on the chat and in the console ...
     
  25. Offline

    Acrobot

  26. Offline

    Wergio

    Acrobot Большое вам Русское спасибо!

    Thank you so much! I'm really grateful to you.
     
  27. Offline

    MrGKanev

    No the server is a survivar and i tried the shop with out Game mode...
     
  28. Offline

    Acrobot

    MrGKanev
    Wait, again.

    "i sends the mesega that it cant sell here..."
    and then
    "no error nothing on the chat and in the console "

    Hmm... So what exactly happens when you click the sign?
    Can you post the IP?
     
    VADemon likes this.
  29. Offline

    cooldudef40

    I keep getting this error when i right-click on a showcase WITHOUT sneaking:

    Code:
    16:01:36 [SEVERE] Could not pass event PlayerInteractEvent to Showcase
    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:441)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:174)
        at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:285)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:723)
        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:116)
        at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:554)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
    Caused by: java.lang.NullPointerException
        at com.narrowtux.showcase.event.ShowcasePlayerListener.onPlayerInteract(ShowcasePlayerListener.java:48)
        at sun.reflect.GeneratedMethodAccessor17.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$1.execute(JavaPluginLoader.java:301Ju
    incase you need it here is my showcase.cfg:
    showcase.cfg (open)
    autosavenotification=false
    priceforbasic=0.0
    removewhenempty=false
    basicusesitem=false
    usespout=false
    priceforfinite=0.0
    showcaseprotection=true
    priceforexchange=0.0
    locale=en-US
    autosaveinterval=60
    basicmode=true
    disabled=false
     
  30. Offline

    VADemon

    Acrobot
    lol, speaking "his english" there xD
     
  31. Offline

    Acrobot

Share This Page