[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

    Acrobot

    @AndyFox42
    Admin shops already do disappear. What is your config file? Are you sure you are putting the string in the right place? (ADMIN_SHOP_NAME)

    @BadDog
    Hey :)
    The config file always generates by itself, but sure, I can upload it.
    http://pastebin.com/55eB9Uci

    2. Spawn-radius means the radius around spawn where people can't build/destroy (even interact while left-clicking).
    If you own the server, you probably have it cuboided anyway.

    3. You can reverse the buttons, as you said - in the config :)
    Also, you can put S 5:7 B now - and it will still work :)

    And no, the only commands there are are:
    - csversion
    - iteminfo
    (They both are in the OP)
     
  3. Offline

    Jobi

    *sorry for bad english*
    I can't make shops on my bukkit 1.8.1 server with iconomy and iconomy chest shop 3.12. when I place a sign with:
    <empty>
    B 10:5 S
    1
    4

    the server says:
    Code:
    16:39:22 [SEVERE] Could not pass event SIGN_CHANGE to ChestShop
    java.lang.NullPointerException
            at org.anjocaido.groupmanager.permissions.NijikoPermissionsProxy.permiss
    ion(NijikoPermissionsProxy.java:242)
            at org.anjocaido.groupmanager.permissions.NijikoPermissionsProxy.has(Nij
    ikoPermissionsProxy.java:225)
            at com.Acrobot.ChestShop.Permission.has(Permission.java:31)
            at com.Acrobot.ChestShop.Permission.has(Permission.java:27)
            at com.Acrobot.ChestShop.Listeners.signChange.onSignChange(signChange.ja
    va:41)
            at org.bukkit.plugin.java.JavaPluginLoader$33.execute(JavaPluginLoader.j
    ava:469)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:338)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:1036)
            at net.minecraft.server.Packet130UpdateSign.a(SourceFile:41)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:91)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:464)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    16:39:23 [SEVERE] Could not pass event PLAYER_INTERACT to EssentialsProtect
    java.lang.NullPointerException
            at org.anjocaido.groupmanager.permissions.NijikoPermissionsProxy.getGrou
    p(NijikoPermissionsProxy.java:247)
            at com.earth2me.essentials.perm.Permissions2Handler.getGroup(Permissions
    2Handler.java:23)
            at com.earth2me.essentials.perm.PermissionsHandler.getGroup(PermissionsH
    andler.java:40)
            at com.earth2me.essentials.PlayerExtension.getGroup(PlayerExtension.java
    :56)
            at com.earth2me.essentials.PlayerExtension.canBuild(PlayerExtension.java
    :66)
            at com.earth2me.essentials.protect.EssentialsProtectPlayerListener.onPla
    yerInteract(EssentialsProtectPlayerListener.java:47)
            at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.j
    ava:314)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:338)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEven
    t(CraftEventFactory.java:161)
            at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.j
    ava:259)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:590)
            at net.minecraft.server.Packet15Place.a(SourceFile:57)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:91)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:464)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    16:39:23 [SEVERE] Could not pass event PLAYER_INTERACT to ChestShop
    java.lang.NullPointerException
            at org.anjocaido.groupmanager.permissions.NijikoPermissionsProxy.permiss
    ion(NijikoPermissionsProxy.java:242)
            at org.anjocaido.groupmanager.permissions.NijikoPermissionsProxy.has(Nij
    ikoPermissionsProxy.java:225)
            at com.Acrobot.ChestShop.Permission.has(Permission.java:31)
            at com.Acrobot.ChestShop.Permission.has(Permission.java:27)
            at com.Acrobot.ChestShop.Listeners.playerInteract.hasAdminPermissions(pl
    ayerInteract.java:86)
            at com.Acrobot.ChestShop.Listeners.playerInteract.onPlayerInteract(playe
    rInteract.java:46)
            at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.j
    ava:314)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.jav
    a:58)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.j
    ava:338)
            at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEven
    t(CraftEventFactory.java:161)
            at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.j
    ava:259)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:590)
            at net.minecraft.server.Packet15Place.a(SourceFile:57)
            at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:91)
            at net.minecraft.server.NetworkListenThread.a(SourceFile:108)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:464)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:374)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:417)
    and nothig happens!
    (im admin, so i don't need permissions)
     
  4. Offline

    Acrobot

    @Jobi
    Your groupManager is corrupted - you should probably ask in the GroupManager's thread.
     
  5. Offline

    BadDog

    Thank you for your fast answer! I didn't want to delete the previous files to auto-generate the new, because I didn't know if it was going to delete the previous shops (and I can't let this happen or my players are going to be really angry). If I delete it to let it auto-generate, is it going to remove them?

    While I'm waiting for this answer, I tried to update my already existing config file with the new values you gave me, but I still can't seem to make the reverse-buttons work, as well as the account set for the Admin Shop. I guess it's best to let it auto-generate then. Maybe it's not called config.yml and not stored in plugins/ChestShop anymore.

    S 1: 2 B is a cool addition, but I think I'd prefer to make it work via the config file, in order not to redo all the (numerous) shops we have on our server :p

    Thanks for the info on the spawn-radius option, I was not entirely sure what it was, and I see now. And thanks too for clarifying that csversion and iteminfo are the only commands!
     
  6. Offline

    Acrobot

    @BadDog
    Haha, unless you use other distance between chest and sign (if you're transisting from iConomyChestShop - old version), which isn't in the new version - everything will work fine.
    Other than that - that's the advantage of not-having any database for shops :)
    You can even use map from another server - everything will be right!

    BE SURE to download from here:
    https://github.com/downloads/Acrobot/ChestShop-3/ChestShop 3.zip
     
    BadDog likes this.
  7. Offline

    Jobi

    now iconomy chest shop doesn't do anything
     
  8. Offline

    Acrobot

    @Jobi
    But what steps did you take to fix this error?
    What do you mean by "ChestShop doesn't do anything"?
    Do you get any errors?
     
  9. Offline

    AndyFox42

    Here's the config:
    http://www.pastie.org/2564031

    And here's what the signs say:
    [​IMG]

    And the chest is still full of items and people are telling me they can't sell any more until I clean them out.
     
  10. Offline

    Kunislaw

    BUG @@@@@@@@ Max bread in one chest 27, two 54.
    bread stack up now !!!!!!!! repair it quickly
    Polska wersja: Jest błąd w jednej skrzyni może byc tylko 27 chleba , choć od wersji 1.8 jedzenie sie stackuje. Lepiej to naprawcie.
     
  11. Offline

    Jobi

    I deleted groupManager, because I didn't needed anymore and than, Chest Shop didn't make anything and there were no errors
     
  12. Offline

    Acrobot

    @Kunislaw
    To jest bardziej błąd Bukkita - nie było kompilowane pod 1.8
    Gdy wyjdzie oficjalna wersja CB pod 1.8, skompiluję pod tą wersję - sądzę, że będzie to niedługo.

    @AndyFox42
    Really weird o.0
    Mind telling me the /csversion?
     
  13. Offline

    Acrobot

    @Jobi
    Hmm, but do you mean that it worked?
    Or it didn't work?
     
  14. Offline

    Jobi

    No, it doesn't work
     
  15. Offline

    Acrobot

    @Jobi
    Please type /csversion in chat and tell me what it says :)
    Also, how doesn't it work?
    What happens if you try to create a shop?
     
  16. Offline

    Jobi

    Version 3.12 and realy nothing happens! No error, no reaction from the plugin.
    My plugins are
    • Craftbook
    • Worldguard
    • Worldedit
    • A little bit essentials
    • Commandbook
    • Command Signs
    • Iconomy
    • Starterkit
     
  17. Offline

    Jobi

    Now there was this error:
    21:57:07 [INFO] [iConomy] Database Error: java.sql.SQLException: No suitable dri
    ver found for jdbc:mysql:\\localhost:3306\iConomy
    21:57:07 [INFO] [iConomy] Database Error: java.sql.SQLException: No suitable dri
    ver found for jdbc:mysql:\\localhost:3306\iConomy
    21:57:07 [INFO] [iConomy] Database Error: java.sql.SQLException: No suitable dri
    ver found for jdbc:mysql:\\localhost:3306\iConomy
     
  18. Offline

    Acrobot

    @Jobi
    Could you download TeamViewer and tell me the ID/PW in the PM? :)

    EDIT: oh, that means that iConomy fails. Are you sure you have MySQL library?
     
  19. Offline

    Jobi

    What is MySQL
    The Problem is, Iconomy works!

    Can you speak German?
     
  20. Offline

    Acrobot

    @Jobi
    MySQL is a database, but since you say that you get this error I believe you didn't use it before - was the iConomy working before? If so, just delete the plugins/iConomy/config.yml.
    If not, you must go into plugins/iConomy/config.yml and change the database type, from MySQL to H2SQL
     
  21. Offline

    Acrobot

  22. Offline

    Jobi

    I changed it and iconomy works fine (like before the change) but iconomy does not react
     
  23. Offline

    Acrobot

    @Jobi
    Hmmm... Are you sure you are
    - running ChestShop?
    - setting up the sign correctly?
     
  24. Offline

    Jobi

    at the moment, i cant use Teamspeak, because my micro is "destroyed" (I dont know an other word)
     
  25. Offline

    Jobi

    I wrote:
    nothing
    B 1:1 S
    1
    stone
     
  26. Offline

    BadDog

    Ok, updating an existing config file didn't work, letting a new one be created did the job. Thanks for your help!
     
  27. Offline

    Jobi

    Did you have the same problem?
     
  28. Offline

    Acrobot

    @BadDog
    No problem :)

    @Jobi
    No, he didn't.
    Also, TEAMVIEWER, not teamspeak. Teamviewer let's me see what you are seeing on your computer :)

    What you are writing on the sign seems fine.
    Do you have the ChestShop.jar inside plugins directory?
     
  29. Offline

    Jobi

  30. Offline

    Acrobot

    @Jobi
    Hmm... What do you get if you type /csversion in the chat?
     
  31. Offline

    MagiicPandaa

    When i am creating an Admin Shop. It only allows people with a rank of Admin or higher to use. Why?
    WHAT PERMISSIONS DO I NEED?
     

Share This Page