[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

  3. Offline

    Shalobee

    So my server just started doing this out of nowhere. started on rb 1000 today right before i updated and it persisted after my update. anyone know what this is. I have been trying to find the sql setup in the config but i don't see it and in fact i have the usedatabase and log to database options set to false. Its spamming my console about every 2 seconds. Anyone know what i can do to make it stop?

    Code:
    [SEVERE] javax.persistence.OptimisticLockException: Data has changed. updated [0] rows sql[delete from cs_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]
    14:16:50 [SEVERE]       at com.avaje.ebeaninternal.server.persist.dml.DmlHandler.checkRowCount(DmlHandler.java:123)
    14:16:50 [SEVERE]       at com.avaje.ebeaninternal.server.persist.dml.DeleteHandler.execute(DeleteHandler.java:81)
    14:16:50 [SEVERE]       at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.execute(DmlBeanPersister.java:105)
    14:16:50 [SEVERE]       at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.delete(DmlBeanPersister.java:67)
    14:16:50 [SEVERE]       at com.avaje.ebeaninternal.server.persist.DefaultPersistExecute.executeDeleteBean(DefaultPersistExecute.java:128)
    14:16:50 [SEVERE]       at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeNow(PersistRequestBean.java:535)
    14:16:50 [SEVERE]       at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeOrQueue(PersistRequestBean.java:557)
    14:16:50 [SEVERE]       at com.avaje.ebeaninternal.server.persist.DefaultPersister.delete(DefaultPersister.java:654)
    14:16:50 [SEVERE]       at com.avaje.ebeaninternal.server.persist.DefaultPersister.delete(DefaultPersister.java:464)
    14:16:50 [SEVERE]       at com.avaje.ebeaninternal.server.core.DefaultServer.delete(DefaultServer.java:1860)
    14:16:50 [SEVERE]       at com.avaje.ebeaninternal.server.core.DefaultServer.delete(DefaultServer.java:1845)
    14:16:50 [SEVERE]       at com.Acrobot.ChestShop.DB.Queue.run(Queue.java:20)
    14:16:50 [SEVERE]       at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    14:16:50 [SEVERE]       at java.lang.Thread.run(Thread.java:662)
    
     
  4. Offline

    Kristure

    @Acrobot
    I tried to delete it and i still have no response when i rightclick or leftclick my shop. I'm only redirected to the chest inventory.

    Just to make something clear. Is it possible to use own shops, or should i get any error message while trying to do so?
     
  5. Offline

    Acrobot

    @Kristure
    No, when you click your own shop you're redirected to the chest.

    @Shalobee
    That's an error when you're database is overloaded.
    Try doing: USE_DATABASE: false and GENERATE_STATISTICS_PAGE: false
     
  6. Offline

    Shalobee

    woohoo that worked thanks a bunch
     
  7. Offline

    Acrobot

  8. Offline

    Curthiany

    - CraftBukkit version 1060

    - ChestShop version 3.0.1

    - Your economy plugin (iConomy
    - Permission plugin 2.7.4
    I have a problem with adminshop..
    and its not a permission problem cause when people make their shops i can sell
    and buy.. in admin shop my default group can buy but cant sell.. my op group can buy and sell stuff in the admin shop..
    any clues???
     
  9. Offline

    micromoose

    Having the same problem with permissions, using
    3.1.5 permissions
    chestshop 3.0
    iconomy 5.0.1
    craftbukkit 1000

    'ChestShop.shop.*'

    Permissions doesn't work at all, not allowed.
     
  10. Offline

    Zeus^

    Hello Acrobot,

    currently i have some problems with your plugin. Im running Craftbukkit version git-Bukkit-0.0.0-945-g73697a4-b1000jnks (MC: 1.7.3) with iConomy and Chesthop ( Version 3.0 ) and some other plugins. As a admin there are no problems with buying / selling any items, but as user.

    In permissions ive added following permissions.

    groups:
    User:
    default: true
    info:
    prefix: ''
    suffix: ''
    build: true
    permissions:
    - 'ChestShop.shop.buy'
    - 'ChestShop.shop.sell'
    - 'ChestShop.shop.create'

    As user you can buy items, but you cant sell them, which makes me a little angry. I canĀ“t figure out what the problem is. If you need further informations about the server please contact me with a PM.

    I hope you can help me,


    greeting from Germany,
    Zeus
     
  11. Offline

    Acrobot

    @Curthiany
    That's spawn protection.
    Go to bukkit.yml, change spawn-radius: 0

    @micromoose
    @Zeus^
    Download 3.01 - it fixes the problem with permissions.
    Also, Zeus - that's spawn protection. Change spawn-radius to 0 in bukkit.yml
     
  12. Offline

    alfw

    can you use this to setup a shop on a town in towny?
     
  13. Offline

    zangetsuslayer

    Not sure if this post is correct but, I was thinking, people can earn tons of money but how does the money disappear? Here my suggestion. For every item you sell it should be taxed at a fixed rate at what server owners want. In example 8.75% or 1% or 0%. And taxation should go into a "bank account" in iconomy so that we can actually say that we don't spawn item 24/7 :D we use bank to help on their project.
     
  14. Offline

    Kainzo

    Does this still support perms 3.x?
     
  15. Offline

    Acrobot

    @Kainzo
    Yeah :)
    And haha, you quoted the first post :D

    @alfw
    Yeah, but an admin has to set up the shops.

    @zangetsuslayer
    There WILL be taxes later :)
     
    zangetsuslayer likes this.
  16. Offline

    Kainzo

    Yeah... there were issues with Permission-Skills - I worked it out and forgot to reply nvm me ;)
     
  17. Offline

    Acrobot

    @Kainzo
    Oh, also Kainzo, I think I forgot to tell you about it -
    In ChestShop 3 (final), there are permissions: ChestShop.shop.buy.id and ChestShop.shop.sell.id - and they let person buy and sell ID's.
     
  18. Offline

    Kainzo

    Yeah I noticed that in the patch notes :)
     
  19. Offline

    dakzerox

    04:12:53 [SEVERE] Could not pass event BLOCK_PISTON_EXTEND to ChestShop
    java.lang.ClassCastException: org.bukkit.material.MaterialData cannot be cast to org.bukkit.material.PistonBaseMaterial
    at org.bukkit.event.block.BlockPistonEvent.getDirection(BlockPistonEvent.java:41)
    at org.bukkit.event.block.BlockPistonExtendEvent.getBlocks(BlockPistonExtendEvent.java:37)
    at com.Acrobot.ChestShop.Listeners.blockBreak.onBlockPistonExtend(blockBreak.java:36)
    at org.bukkit.plugin.java.JavaPluginLoader$43.execute(JavaPluginLoader.java:540)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:332)
    at net.minecraft.server.BlockPiston.g(BlockPiston.java:70)
    at net.minecraft.server.BlockPiston.doPhysics(BlockPiston.java:47)
    at net.minecraft.server.World.k(World.java:453)
    at net.minecraft.server.World.applyPhysics(World.java:432)
    at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:49)
    at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:286)
    at net.minecraft.server.World.k(World.java:453)
    at net.minecraft.server.World.applyPhysics(World.java:433)
    at net.minecraft.server.BlockDiode.c(SourceFile:212)
    at net.minecraft.server.Chunk.a(Chunk.java:265)
    at net.minecraft.server.World.setRawTypeIdAndData(World.java:291)
    at net.minecraft.server.World.setTypeIdAndData(World.java:384)
    at net.minecraft.server.BlockDiode.a(SourceFile:69)
    at net.minecraft.server.World.a(World.java:1982)
    at net.minecraft.server.World.doTick(World.java:1722)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:441)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  20. Offline

    Acrobot

    @dakzerox
    That's a bukkit bug. Please report it to leaky.bukkit.org
     
  21. Offline

    krishna270

    craftbukkit version git_Bukkit-0.0.0-980-g4ed23bl-b1060jnks (MC: 1.73)
    Cs version: 3.01
    Iconomy
    no permission plugins
    My chest shop works perfectly but then when I try to make an admin shop with AdminShop as it says in my config file and once i post the sign it just changes it to krishna270 and makes it my store, not an admin store.
     
  22. Offline

    G1R Productions

    Will this work with modded servers that have ww2 guns mod, planes mod, and ww2 vehicles mod? (By work I mean will it be able to sell the items)

    EDIT:
    22:45:26 [SEVERE] Could not pass event PLAYER_INTERACT to ChestShop
    java.lang.NullPointerException
    at org.bukkit.craftbukkit.block.CraftBlock.getState(CraftBlock.java:199)
    at com.Acrobot.ChestShop.Utils.uSign.isSign(uSign.java:22)
    at com.Acrobot.ChestShop.Listeners.playerInteract.onPlayerInteract(playerInteract.java:53)
    at org.bukkit.plugin.java.JavaPluginLoader$11.execute(JavaPluginLoader.java:314)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
    at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:168)
    at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:210)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:573)
    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:89)
    at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:460)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:369)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
     
  23. Offline

    number1_Master

    so the chests will be protected or do u need to put [private] on them?
     
  24. Offline

    BHolmes505

    Okay I'm running a Bukkit server on 904 and also whenever I type /csversion it just says /csversion back to me in the text log..Also I am using iConomy and Permissions 2. So anyways for some reason the AdminShops arent working..I set one up like this:

    AdminShop
    5
    10:2
    Stone

    And nothing happens when I try to use it. Help please??
     
  25. Offline

    untergrundbiber

    Massive Lags an console spam:

    Code:
    15:01:15 [SEVERE] javax.persistence.OptimisticLockException: Data has changed. updated [0] rows sql[delete from cs_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]
    15:01:15 [SEVERE]       at com.avaje.ebeaninternal.server.persist.dml.DmlHandler.checkRowCount(DmlHandler.java:123)
    15:01:15 [SEVERE]       at com.avaje.ebeaninternal.server.persist.dml.DeleteHandler.execute(DeleteHandler.java:81)
    15:01:15 [SEVERE]       at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.execute(DmlBeanPersister.java:105)
    15:01:15 [SEVERE]       at com.avaje.ebeaninternal.server.persist.dml.DmlBeanPersister.delete(DmlBeanPersister.java:67)
    15:01:15 [SEVERE]       at com.avaje.ebeaninternal.server.persist.DefaultPersistExecute.executeDeleteBean(DefaultPersistExecute.java:128)
    15:01:15 [SEVERE]       at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeNow(PersistRequestBean.java:535)
    15:01:15 [SEVERE]       at com.avaje.ebeaninternal.server.core.PersistRequestBean.executeOrQueue(PersistRequestBean.java:557)
    15:01:15 [SEVERE]       at com.avaje.ebeaninternal.server.persist.DefaultPersister.delete(DefaultPersister.java:654)
    15:01:15 [SEVERE]       at com.avaje.ebeaninternal.server.persist.DefaultPersister.delete(DefaultPersister.java:464)
    15:01:15 [SEVERE]       at com.avaje.ebeaninternal.server.core.DefaultServer.delete(DefaultServer.java:1860)
    15:01:15 [SEVERE]       at com.avaje.ebeaninternal.server.core.DefaultServer.delete(DefaultServer.java:1845)
    15:01:15 [SEVERE]       at com.Acrobot.ChestShop.DB.Queue.run(Queue.java:20)
    15:01:15 [SEVERE]       at org.bukkit.craftbukkit.scheduler.CraftWorker.run(CraftWorker.java:34)
    15:01:15 [SEVERE]       at java.lang.Thread.run(Unknown Source)
    
    Log to Database is set to false in the config
     
  26. Offline

    SpiFioY

    Do you have user named AdminShop? If you don't, create one and add more than 10 000 000 in his account...
     
  27. Offline

    wicked9090

    when i try creating a shop it says you cant create this kind of shop whether i leave top blank, type my username or type Admin Shop how can i fix it?
     
  28. Offline

    walsand

    how do i get money
    and what commands are there?
     
  29. Offline

    Acrobot

    @nunber1_Master
    They will be protected - however not with Lockette. If you want Lockette protection, you need to place the private sign.

    @krishna270
    That's because you're not OP.

    @G1R Productions
    That's actually a bug with your custom CraftBukkit build - you should report this error in mod's thread.

    @untergrundbiber
    Do you have GENERATE_STATISTICS_PAGE set to true? If so, that error says the database is overloaded at the moment.

    @BHolmes505
    Are you sure you've got the plugin?

    @wicked9090
    You need to have ChestShop.shop.* permission.

    @walsand
    If you mean how to get money plugin, go to plugins.bukkit.org and choose one - for example, iConomy or BOSEconomy
    If you mean how to get money in plugin, just either make shops and sell things, or if you have earning money every X minutes in config - wait X minutes.
     
    nunber1_Master likes this.
  30. Offline

    BHolmes505

    Yes Acrobat I'm sure I've got the plugin. And do I actually need a user named AdminShop?
     
  31. Offline

    walsand

    it says i created a shop, but nobody can buy and sell.
    Please help me, im using the latest craft bukkitt and no permissions, i just go by op.
    Thanks! ;)
     

Share This Page