[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

    Liger_XT5

    Update to iConomy 5.
    Go into the config file and find:
    serverAccountName:
    There is a set of quotes after it, put the name in between.
     
  3. Offline

    ValBGaming

    For this, how do I then use the name for admin shops? Because when I type the name in as the name set in the config, it doesn't work...
     
  4. Offline

    Liger_XT5

    do you have yourself or your group set with the 'iConomyChestShop.admin' permission?
    As long as you have that permission and have the config file set with the name you want, all you have to do is make a store with the exact same name and you are good to go.
     
  5. Offline

    JacKlink01

    Thanks! That worked.. weird that it didn’t work when i re-downloaded the config from the post.

    One more issue..... I set our Admin Shops to go to an iConomy account named "City," but the money never goes into it, it just goes out of it. Meaning that sell signs do affect the balance and buy signs do not. This is sorta not good because this account will just become quickly run dry.
     
  6. Offline

    ValBGaming

    Yeah I have the - '*' permissions, and in the config I have serverAccountName: "Server" along with the stores having the name "Server" but they aren't functioning as an admin shop. :(

    Just put a couple items into one of the shops and even the money is using the account like it should... It seems that the only problem is that its just not being treated as an admin shop, a bug maybe? Or is it working for others?
     
  7. Offline

    hofec

    it works on the principle of creating an iConomy account for all these "Admin Shops" which can be found just in config ;)
     
  8. Offline

    RustyDagger

    The whole admin shop system just seems stupid now Just a simple name on the top of the sign should work however it dose not i dnt want to give the server an account why on F****** earth would you want that it would need to be unlimited any way or all the shops would soon run out of money to buy items from the players (personally i have no signs where players can sell items to the server the whole idea just leads to mega rich players.)
     
  9. Offline

    Ludde112

    @Acrobot Thank you for the help! Now I have a admin shop but how do I get the block of the material instead of the chest ? Anyone that can help me?

    Appreciate all help I can get
     
  10. Offline

    Liger_XT5

    If you want an unlimited shop, just use Admin as the shop name. Otherwise use a player name or a "server name."
    Give the "server name" a slightly large amount of money and let players sell stuff to it to stock it up and players to buy from it. Just be smart on the buy/sell prices. Make the "buy from shop" price slightly higher than the "sell to shop" price.

    I know that in previous versions of the chestshop plugin you could put any name you wanted on the shop. I did this with three different store types. General Store, Mining Store, and Armory. But for now, I'm stuck with just one name for the server instead of a player being stuck with the spamming messages and crazy bank balance lol.
     
  11. Offline

    DemonCraft

    Didn't find anything you said and I searched it.
     
  12. Offline

    Acrobot

    @RustyDagger
    Did you read the config.yml?
    If you DON'T WANT a server account, just do
    serverAccountName: ""

    It WILL NOT use economy for admin shops then.

    serverAccountName is name OF ECONOMY ACCOUNT you want to use, that is associated with Admin Shops. If you do not want to use it, just do
    Code:
    serverAccountName: ""
    
    @DemonCraft
    Just add it if it isn't there.
     
  13. Offline

    Ludde112

    But does someone know how I have a block of for example daimond as ´´chest´´?
    I saw this at a server and at the daimond shop they have a daimond block under the sig insead of a ordinary chest.
    How do they do?
     
  14. Offline

    Acrobot

    @Ludde112
    The diamond block isn't a "chest". It's just placed there.
    You can create admin shops without chests, just the sign.
     
  15. Offline

    Ludde112

    @Acrobot Thank you!!! I didn't realise that!
    Thanx again
     
  16. Offline

    creec

    This is pissing me off.
    Even tho i do it right. It won't work.

    Signs get created, but right after they lose text and don't work.
     
  17. Offline

    creec

    Here is a picture:
    http://goo.gl/rr0ZE

    This has been like this since you broke sign creating with specific name. (When you don't leave first line blank, whole sign fails to create and results in empty piece of wood.)
     
  18. Offline

    creec

    Just adding that code used in example above was:
    ---
    Admin Shop
    1
    1:1
    1
    ---
     
  19. Offline

    Acrobot

    @creec
    3.0 will be soon, please wait about 1-2 days, ok?
    BTW, try relogging, does it leave blank sign too?
     
  20. Offline

    Acrobot

    @creec
    Also, do you get any errors in the console?
     
  21. Offline

    ValBGaming

    @Acrobot
    Bit of a feature request.

    Say I set serverAccountName to "Server", and want to use the word "Server" on the top line of the sign instead of "AdminShop", it'd be great if you could add something like this. :)
     
  22. Offline

    imaxorz

    Does anyone know if there is anyway to sell Charcoal?
     
  23. Offline

    spunkiie

    This plugin is great but my server console keeps spaming:

    :javax.persistence.OptimisticLockException: Data has changed. updated [0] rows sql[delete from ics_transactions where id=? and buy=? and shop_owner=? and shop_user=? and item_id=? and item_durability=? and amount=? and price=? and sec=?] bind[null]
    : at com.avaje.ebeaninternal.server.persist.dml.DmlHandler.checkRowCount(DmlHandler.java:123)
    : at com.avaje.ebeaninternal.server.persist.dml.DeleteHandler.execute(DeleteHandler.java:81)
    : at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.execute(DmlBeanPersister.java:105)
    : at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.delete(DmlBeanPersister.java:67)
    : at com.avaje.ebeaninternal.server.persist.DefaultPersistExecute.executeDeleteBean(DefaultPersistExecute.java:128)
    : at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeNow(PersistRequestBean.java:535)
    : at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeOrQueue(PersistRequestBean.java:557)
    : at com.avaje.ebeaninternal.server.persist.DefaultPersister.delete(DefaultPersister.java:654)
    : at com.avaje.ebeaninternal.server.persist.DefaultPersister.delete(DefaultPersister.java:464)
    : at com.avaje.ebeaninternal.server.core.DefaultServer.delete(DefaultServer.java:1860)
    : at com.avaje.ebeaninternal.server.core.DefaultServer.delete(DefaultServer.java:1845)
    : at com.Acrobot.iConomyChestShop.Logging.removeOld(Logging.java:77)
    : at com.Acrobot.iConomyChestShop.Logging.run(Logging.java:82)
    : at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    : at java.lang.Thread.run(Thread.java:662)
    :GustavoHexa tried command: troca
    :javax.persistence.OptimisticLockException: Data has changed. updated [0] rows sql[delete from ics_transactions where id=? and buy=? and shop_owner=? and shop_user=? and item_id=? and item_durability=? and amount=? and price=? and sec=?] bind[null]
    : at com.avaje.ebeaninternal.server.persist.dml.DmlHandler.checkRowCount(DmlHandler.java:123)
    : at com.avaje.ebeaninternal.server.persist.dml.DeleteHandler.execute(DeleteHandler.java:81)
    : at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.execute(DmlBeanPersister.java:105)
    : at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.delete(DmlBeanPersister.java:67)
    : at com.avaje.ebeaninternal.server.persist.DefaultPersistExecute.executeDeleteBean(DefaultPersistExecute.java:128)
    : at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeNow(PersistRequestBean.java:535)
    : at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeOrQueue(PersistRequestBean.java:557)
    : at com.avaje.ebeaninternal.server.persist.DefaultPersister.delete(DefaultPersister.java:654)
    : at com.avaje.ebeaninternal.server.persist.DefaultPersister.delete(DefaultPersister.java:464)
    : at com.avaje.ebeaninternal.server.core.DefaultServer.delete(DefaultServer.java:1860)
    : at com.avaje.ebeaninternal.server.core.DefaultServer.delete(DefaultServer.java:1845)
    : at com.Acrobot.iConomyChestShop.Logging.removeOld(Logging.java:77)
    : at com.Acrobot.iConomyChestShop.Logging.run(Logging.java:82)
    : at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    : at java.lang.Thread.run(Thread.java:662)

    I'm using Mysql 5.5.12
     
  24. Offline

    Acrobot

    @spunkiie
    It seems like your database is corrupted, just delete it and it will re-create one.
     
  25. Offline

    spunkiie

    But then I will lose all my shops, right ? :(
     
  26. Offline

    Acrobot

    @spunkiie
    No :)
    It's only a temporary database, to keep log of recent transaction to generate HTML page.
     
  27. Offline

    spunkiie

    @Acrobot

    Nice :D

    Can I delete ics_transactions table WHILE the server is running ?

    EDIT: Deleted and everything is OK now :)
    ty again
     
  28. Offline

    spunkiie

    Damn.. After a few minutes the error started again :(
    What else can I do ? Is it possible to disable HTML page generation ?
     
  29. Offline

    Acrobot

    @spunkiie
    Yes, you can, however it will not work anyways.
    Either change bukkit.yml to not use MySQL, or unzip the .jar file and in "plugin.yml" delete the line that says "database: true".
    In config.yml change useDB to false
     
  30. Offline

    rad1game

    Code:
    2011-05-18 22:45:04 [INFO] [iConomyChestShop] rad1game created shop in world, x = -116, y = 65, z = -90, which first line is Admin Shop and it buys/sells 1 WATER, and the buy/sell line looks like: "B 250:0 S"
    2011-05-18 22:45:05 [SEVERE] Could not pass event PLAYER_INTERACT to iConomyChestShop
    java.lang.NullPointerException
        at com.Acrobot.iConomyChestShop.Shop.buy(Shop.java:74)
        at com.Acrobot.iConomyChestShop.ShopManager.buy(ShopManager.java:61)
        at com.Acrobot.iConomyChestShop.ShopManager.transaction(ShopManager.java:43)
        at com.Acrobot.iConomyChestShop.iConomyChestShopPlayerListener.onPlayerInteract(iConomyChestShopPlayerListener.java:87)
        at org.bukkit.plugin.java.JavaPluginLoader$9.execute(JavaPluginLoader.java:299)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:302)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:162)
        at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:207)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:535)
        at net.minecraft.server.Packet15Place.a(SourceFile:57)
        at net.minecraft.server.NetworkManager.a(NetworkManager.java:196)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:377)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:292)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    2011-05-18 22:45:06 [SEVERE] Could not pass event PLAYER_INTERACT to iConomyChestShop
    java.lang.NullPointerException
        at com.Acrobot.iConomyChestShop.Shop.buy(Shop.java:74)
        at com.Acrobot.iConomyChestShop.ShopManager.buy(ShopManager.java:61)
        at com.Acrobot.iConomyChestShop.ShopManager.transaction(ShopManager.java:43)
        at com.Acrobot.iConomyChestShop.iConomyChestShopPlayerListener.onPlayerInteract(iConomyChestShopPlayerListener.java:87)
        at org.bukkit.plugin.java.JavaPluginLoader$9.execute(JavaPluginLoader.java:299)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:302)
        at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:162)
        at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:207)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:535)
        at net.minecraft.server.Packet15Place.a(SourceFile:57)
        at net.minecraft.server.NetworkManager.a(NetworkManager.java:196)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:75)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:377)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:292)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    

    - [​IMG]
    - Yes, 2.7.3
    - Sorry, but no.
    - http://pastebin.com/T0KnhSQQ
    - ^
    - Tty buy any block from "Admin Shop", got this: [​IMG]
     
  31. Offline

    Ludde112

    Where do I find serverAccountName:?
    In which config file?
     

Share This Page