[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

    @Raycrash
    Unfortunately, it's a bug in CraftBukkit :/
     
  3. Offline

    Raycrash

    ok I see sticky pistons involved what does that bug do anyways ?

    Does it crash chestshop ? it seemed so because no shop was usuabel and all chests where free to pick by everyone :X
     
  4. Offline

    Acrobot

    @Raycrash
    I have no clue - it shouldn't crash ChestShop o.0
    You see, all I do is check which block does the piston pull/push :/
     
  5. Offline

    Raycrash

    Well I don't know why then but chest shop just stopped working and all I saw was this error....ok i see I'll look into the logs again
     
  6. Offline

    Acrobot

  7. Offline

    Hanver

    what do you think about to add a rent system. so can the user rent a shop for x days than the shop is closeing or he pay the next rent
     
  8. Offline

    Gridalien

    When I try to create any type of shop ingame, chest or admin, the sign pops off and the game says '[Shop] You can't create this type of shop!' for seemingly no reason. Permissions and everything seem to be fine. I can't figure out why this isn't working.

    I'm running Craftbukkit git-Bukkit-0.0.0-980-g4ed23b1-b1060jnks (MC: 1.7.3)
    The ChestShop version is 3.04, latest.
    I'm using iConomy, since Essentials money doesn't prevent you from buying something if you don't have enough, can can continue past the point of negative numbers.
    And I'm using the Permissions plugin that's standard with Bukkit now.

    Any ideas of what's wrong?
     
  9. Offline

    Hamad

  10. @Gridalien
    Say which permissions for your group are installed. Don't forget: permissions are case-sensitive
    A normal user should have theese permissions:
    ChestShop.shop.create
    ChestShop.shop.buy
    ChestShop.shop.sell
     
  11. Offline

    Acrobot

    @Gridalien
    Permissions error, as @VADemon said :)

    @Hanver
    I use no databases - that's the problem. It would be really hard to do that.
     
  12. Offline

    seanie.dolan

    admin shop dosent work just says cannot find a chest
     
  13. Offline

    Acrobot

    @seanie.dolan
    /csversion?
    What do you have on the sign?
    What is your config?
     
  14. Offline

    Gridalien

    How is it a permissions error when both regular users, AND the OP have the permission to create shops?
     
  15. Offline

    Acrobot

    @Gridalien
    Why is it a permission error?
    If you're using any plugin that uses Bukkit's permission system (I bet you do), you just have to negate ChestShop.shop.create.
    For example, in PermissionsBukkit you add a permission like normally, but instead of "true", you put "false",
    like
    - ChestShop.shop.create: false
     
  16. Offline

    Gridalien

    I'm using Permissions Yeti, apparently. I've tried all sorts of things and this plugin still isn't working. Maybe I should switch to something that will work.
     
  17. Offline

    Acrobot

    @Gridalien
    Permissions by TheYeti should work fine.
    What does your permission file look like? Could you upload it on pastebin.com and link me to it?
     
  18. Offline

    Gridalien

  19. Offline

    Acrobot

    @Gridalien
    I see you are either
    - using iConomyChestShop version 2 (which is outdated)
    - have wrong permissions for ChestShop - you need to change iConomyChestShop to ChestShop
     
  20. Offline

    Gridalien

    Your provided download would have to be outdated then, which is the version I happen to be using. It's also been doing this before I made any specific changes to the permissions, and since the OP has universal permissions, that's an issue that'll carry over to regular users. But I'll be sure to change the ones I have set for regular users.

    [Edit]

    Huh. It's working now.

    How about that?
     
  21. Offline

    Gridalien

    Now making an admin shop doesn't seem to be working. It just converts to a normal shop..
     
  22. Offline

    Acrobot

    @Gridalien
    That means you haven't got ChestShop.admin permission.
    Also, the download link isn't outdated - it's always the newest version.
     
  23. Offline

    imaxorz

    Any idea what causes this?
    Show Spoiler


    2011-09-04 21:04:20 [SEVERE] javax.persistence.PersistenceException: ERROR executing DML bindLog[] error[Duplicate entry '35159' for key 'PRIMARY']
    2011-09-04 21:04:20 [SEVERE] at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.execute(DmlBeanPersister.java:116)
    2011-09-04 21:04:20 [SEVERE] at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.insert(DmlBeanPersister.java:76)
    2011-09-04 21:04:20 [SEVERE] at com.avaje.ebeaninternal.server.persist.DefaultPersistExecute.executeInsertBean(DefaultPersistExecute.java:91)
    2011-09-04 21:04:20 [SEVERE] at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeNow(PersistRequestBean.java:527)
    2011-09-04 21:04:20 [SEVERE] at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeOrQueue(PersistRequestBean.java:557)
    2011-09-04 21:04:20 [SEVERE] at com.avaje.ebeaninternal.server.persist.DefaultPersister.insert(DefaultPersister.java:404)
    2011-09-04 21:04:20 [SEVERE] at com.avaje.ebeaninternal.server.persist.DefaultPersister.saveVanillaInsert(DefaultPersister.java:377)
    2011-09-04 21:04:20 [SEVERE] at com.avaje.ebeaninternal.server.persist.DefaultPersister.saveVanillaRecurse(DefaultPersister.java:361)
    2011-09-04 21:04:20 [SEVERE] at com.avaje.ebeaninternal.server.persist.DefaultPersister.saveRecurse(DefaultPersister.java:308)
    2011-09-04 21:04:20 [SEVERE] at com.avaje.ebeaninternal.server.persist.DefaultPersister.save(DefaultPersister.java:282)
    2011-09-04 21:04:20 [SEVERE] at com.avaje.ebeaninternal.server.core.DefaultServer.save(DefaultServer.java:1765)
    2011-09-04 21:04:20 [SEVERE] at com.avaje.ebeaninternal.server.core.DefaultServer.save(DefaultServer.java:1751)
    2011-09-04 21:04:20 [SEVERE] at com.Acrobot.ChestShop.DB.Queue.run(Queue.java:22)
    2011-09-04 21:04:20 [SEVERE] at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    2011-09-04 21:04:20 [SEVERE] at java.lang.Thread.run(Unknown Source)
    2011-09-04 21:04:20 [SEVERE] Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '35159' for key 'PRIMARY'
    2011-09-04 21:04:20 [SEVERE] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    2011-09-04 21:04:20 [SEVERE] at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    2011-09-04 21:04:20 [SEVERE] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    2011-09-04 21:04:20 [SEVERE] at java.lang.reflect.Constructor.newInstance(Unknown Source)
    2011-09-04 21:04:20 [SEVERE] at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    2011-09-04 21:04:20 [SEVERE] at com.mysql.jdbc.Util.getInstance(Util.java:382)
    2011-09-04 21:04:20 [SEVERE] at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1039)
    2011-09-04 21:04:20 [SEVERE] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593)
    2011-09-04 21:04:20 [SEVERE] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525)
    2011-09-04 21:04:20 [SEVERE] at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986)
    2011-09-04 21:04:20 [SEVERE] at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140)
    2011-09-04 21:04:20 [SEVERE] at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2626)
    2011-09-04 21:04:20 [SEVERE] at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2111)
    2011-09-04 21:04:20 [SEVERE] at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2407)
    2011-09-04 21:04:20 [SEVERE] at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2325)
    2011-09-04 21:04:20 [SEVERE] at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2310)
    2011-09-04 21:04:20 [SEVERE] at com.avaje.ebeaninternal.server.lib.sql.ExtendedPreparedStatement.executeUpdate(ExtendedPreparedStatement.java:164)
    2011-09-04 21:04:20 [SEVERE] at com.avaje.ebeaninternal.server.type.DataBind.executeUpdate(DataBind.java:74)
    2011-09-04 21:04:20 [SEVERE] at com.avaje.ebeaninternal.server.persist.dml.InsertHandler.execute(InsertHandler.java:155)
    2011-09-04 21:04:20 [SEVERE] at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.execute(DmlBeanPersister.java:105)
    2011-09-04 21:04:20 [SEVERE] ... 14 more

    Once it happens it will spam this in the console every 3 seconds or so.

    It happens once in a while with a different ID. The way I fix it, is I stop the server go into the DB and physically delete that ID.
     
  24. Offline

    Schinken_Manuel

    I would like to suggest some sort of discount for either single Members or Groups (For example a Donator group on my Server would get 15% discount at adminshops).
     
  25. Offline

    Acrobot

    @imaxorz
    Something bugged with DB - unfortunately, EBeans is bad :/
    I don't like it :/

    @Schinken_Manuel
    Hmm, seems nice - but how should I implement it?
     
  26. Offline

    Raycrash

    if permission boni == true then price * discount
     
  27. Offline

    Acrobot

    @Raycrash
    Yeah, should be OK.
    BTW, awesome sig. I saw the video somewhere, IIRC :)
     
  28. Offline

    imaxorz

    I was thinking maybe if someone buys/sells something too fast it doesn't think it recorded the data the first them and then tried to overwrite it again?
     
  29. Offline

    GordonGrey

    @Acrobot

    Any chance of you releasing the stacking of non-stackables version before 1.8?
     
  30. Offline

    Acrobot

    @imaxorz
    Nope, not possible. It queues the database queries, so it only saves every X seconds (don't remember exactly, probably something like 10)

    @GordonGrey
    Sure.
    Unfortunately, I have to go ATM, and I have school from 8.00 to 15.15, so it's hard to find free time, especially if you've got more things to do outside school.
     
  31. Offline

    imaxorz

    Ah, ok.

    Well I was just letting you know. It's not really a big deal as it only happens once in a while.
     

Share This Page