[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

    TheBeast808

    It needs decimals! Nothing can sell for less than 1, which I need for cobble...
     
  3. Offline

    dennisfett

    Hey
    As an Admin i can buy and sell to shops, but the normal users arent allowed.
    "[Permissions] You can't buy(/sell) from(/to) shops"
    I've changed the Permissions, and even deleted it; but there's always the same error... :'(
    Please help me!
    http://www.pasteall.org/pic/show.php?id=11626
     
  4. Offline

    Latros

    I'm getting a critical error with iConomyChestShop that auto-shuts down the server, have to disable it for now :(

    Error:

    Code:
    java.lang.NumberFormatException: For input string: "B 15"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
        at java.lang.Integer.parseInt(Integer.java:449)
        at java.lang.Integer.parseInt(Integer.java:499)
        at com.Acrobot.iConomyChestShop.SignManager.onSignChange(SignManager.java:93)
        at org.bukkit.plugin.java.JavaPluginLoader$29.execute(JavaPluginLoader.java:376)
        at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:59)
        at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:257)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:900)
        at net.minecraft.server.Packet130UpdateSign.a(SourceFile:41)
        at net.minecraft.server.NetworkManager.a(NetworkManager.java:195)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:74)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:100)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:370)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:285)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    2011-04-28 05:22:09 [INFO] [CONSOLE] Server is restarting. World is being saved.
    Using;

    http://i52.tinypic.com/33k3gw6.png

    + B735jnks

    Doesn't seem to be a conflicting-with-another-plugin issue, though, since the guy 2 posts above mine barely has any plugins and he's getting it to for a very similar character string.

    Could use a fix ASAP - our server is heavily dependent on the economy and people setting up their own shops, and we see a regular 100+ online during primetime. Fix ASAP! <3
     
  5. Offline

    dR!V3xXx

    Hi, nice Plugin really good. But I have a question. Can I build a shop on my server where people can buy items from the server? I want that my user can buy all items they want from the server. I don't want to build a shop, spawn all items and sell them because then I get the money. But I don't want the money. Do you know what I mean ?
     
  6. Offline

    City Builder

    you could create a user account in iconomy database something like 'bank' then just create shops with Bank as the name, then spawn in the items you want to sell. Then when players buy from that shop the money simply goes to the 'bank' account in iconomy instead of your own.

    Maybe theres an easier way, but its what we do for people to sell diamonds, gold etc to the city, so that nobody gets the money.
     
  7. Offline

    dR!V3xXx

    Oh great. Thank you :)
     
  8. Offline

    catboy5

    I Got a Error :(
    Code:
    14:58:19 [SCHWERWIEGEND] Could not load 'plugins\iConomyChestShop.jar' in folder
     'plugins':
    unacceptable character #FFFD special characters are not allowed
    in "<reader>", position 968
            at org.yaml.snakeyaml.reader.StreamReader.checkPrintable(StreamReader.ja
    va:68)
            at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:159)
            at org.yaml.snakeyaml.reader.StreamReader.peek(StreamReader.java:117)
            at org.yaml.snakeyaml.reader.StreamReader.peek(StreamReader.java:106)
            at org.yaml.snakeyaml.scanner.ScannerImpl.scanToNextToken(ScannerImpl.ja
    va:964)
            at org.yaml.snakeyaml.scanner.ScannerImpl.fetchMoreTokens(ScannerImpl.ja
    va:237)
            at org.yaml.snakeyaml.scanner.ScannerImpl.checkToken(ScannerImpl.java:18
    3)
            at org.yaml.snakeyaml.parser.ParserImpl$ParseImplicitDocumentStart.produ
    ce(ParserImpl.java:200)
            at org.yaml.snakeyaml.parser.ParserImpl.peekEvent(ParserImpl.java:163)
            at org.yaml.snakeyaml.parser.ParserImpl.checkEvent(ParserImpl.java:148)
            at org.yaml.snakeyaml.composer.Composer.getSingleNode(Composer.java:104)
    
            at org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseCons
    tructor.java:124)
            at org.yaml.snakeyaml.Yaml.load(Yaml.java:264)
            at org.bukkit.util.config.Configuration.load(Configuration.java:73)
            at org.bukkit.plugin.java.JavaPlugin.initialize(JavaPlugin.java:158)
            at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.j
    ava:138)
            at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.
    java:160)
            at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager
    .java:108)
            at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:84)
            at net.minecraft.server.MinecraftServer.e(MinecraftServer.java:217)
            at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:204)
            at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:144)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:259)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
     
  9. Offline

    Acrobot

    @ros
    @DannyCare
    Auto shutdowns? Weird. I posted about it to other guy yesterday, anyways, fixing this now.

    @catboy5
    Your config file is corrupted (you have tab instead of spaces)

    @dR!V3xXx
    Look up admin shop in my post. If you have admin rights, you can create shop with first line being "admin shop".
     
  10. Offline

    Acrobot

    New version released, supports decimals and fixes the annoying bug!
     
  11. Offline

    imaxorz

    Well my programing skills end at editing permissions file, so I rather post it here to get others input.

    My idea is to have 5 columns in the log (Might be easier using MySQL?) Item name (or ID), Amount, Buy Price, Sell Price, and Date.

    Basically it would total buy prices, sell prices, and amounts for the different items and then devide the total prices by amounts to get the average buy or sell price for that item. My guess this could be done fairly easily using php if the DB is using MySQL?

    Why the date? Well in the config there could be an option for how long you want the transactions to be stored over. So let's say I put 7 days. That means if the record is older than 7 days it would get purged so the prices would be an average over the last 7 days. This will let the admin adjust the accuracy and the log size based on their needs. Since smaller servers would probably need a longer log because there are less transactions, while bigger servers might only need a log of 3 days since there is a lot more transactions.

    There could also be an amount for both buy and sell, and a trend column. It can check if the previous average price for any item was more or less then the current on then let you know if the price is trending up or down. This of course makes it even more complicated as there is a need for more variables.

    That's all I had in mind. I hope it makes sense. I'm super excited if anything like this get implemented.

    Thank you for even wanting to hear what I had in mind :)
     
  12. Offline

    Acrobot

    @imaxorz
    I don't want to use any databases but flatfiles.
    I think I am able to do it, but currently I have not enough time :/ I'll start working on it on 2nd and 3rd May, because I have 2 day holidays :p
     
  13. Offline

    imaxorz

    That's no problem, like I said I don't know much about coding at all. I figured it would be harder with flat files, but if it works, it works :)

    Take your time, I'm just glad you like the idea.
     
  14. Offline

    LePad

    Good job with the decimals !
     
  15. Offline

    Acrobot

    @imaxorz
    After looking into built-in bukkit database, it seems so easy, that I am asking myself why I didn't learn this before.
    If logging works fine, I'll make the plugin work on databases - really, really better :)
     
  16. Offline

    imaxorz

    I can't wait! Thank you so much!

    I think other will like this too.
     
  17. Offline

    DannyCare

    Great stuff :) I have a couple of requests if you don't mind my asking:
    I'd like an option to disable certain notifications in game. When people buy from and sell to your shop one after another the chat window becomes flooded. The same applies to any notification you get from your plugin in game, like out of stock etc. I understand people also want to be notified so you could perhaps implement something so that every 10 (or x amount) purchases/sells to your shop you get a notification telling you your balance and the items sold.

    Better yet you could create a command that shows your daily buys/sells in total rather than being spammed every purchase and sale. It's driving me mad, but I love your plugin and the concept so please consider my ideas :) Also you should cut down on the console spam aswell as it creates the same message in the console. Perhaps just use your own log file rather than bulking up the server log more.

    Take this as constructive criticism, as I really do love your plugin and I appreciate all the hours you put into creating it and helping users out. Please let me know if any of these features get added. Thanks Acrobot! :D
     
  18. Offline

    Acrobot

    @DannyCare
    Daily purchases/sells are coming, when I learn how to use database (Not long :))
    It will be MUCH easier for me :)

    Thanks for the suggestions, I'll keep 'em in mind!
    Really, Bukkit database seems so nice :)
     
  19. Offline

    Troxis97

    hello this mod is not working for me i type in the stuff on the sign and nothing happens!
     
  20. Offline

    Latros


    Is this fixed yet?
     
  21. Offline

    killergee100

    hello can you please help me with permissions with your plugin i am vary confused about that part
     
  22. Offline

    Atilme

    Hey, I like your plugin! I think we might keep it on our server, because it's simple and pretty awesome!
    I have a question though, how do you make a store for an account that you don't own? I've tried filling in the first line with the account name, but it just auto-fills it with mine, could you help please?
     
  23. Offline

    Damien711

    Not working for me i get interal error everytime. The iconomyshop file doesn't generate either.
     
  24. Offline

    Atilme

    The config file for iConomyChestShop doesn't automatically generate (A feature I would like to request =P) You have to get it from the zip file that is attached to the bottom of the OP, and put it in your plugins folder. Then you can edit it to your liking, and you might not get internal errors anymore.
     
  25. Offline

    Damien711

    Ok thank you I just realized that plugin works great now thanks.
     
  26. Offline

    banana_poop

    This be a very good plugin,
    But u made me make an account to download, ye be an evil person
     
  27. Offline

    Latros

    No response yet?
     
  28. Offline

    Latros

    Any news on a fix for the bug I posted above?
     
  29. Offline

    riuthamus

    This plugin works flawlessly. I love it. Seriously one of the best plugins possible. We will be advertising this with our BOSEcon from now on.

    Suggestions:
    1) Ability to hook in bank accounts ( bosecon ) to the store
    2) Ability to change the color of the STORENAME with a config option
    3) Change the B to Green and the S to red
     
  30. Offline

    creec

    In latest version i can no longer create store with specified seller. Like writing BANK at first line creates empty sign, which obviously does not work. Only works if you leave first line empty, but that is not what i want.
     
  31. Offline

    creec

    I just realized this is an exploit fix, but i wish there was permission node for this, so admins can create city shops and ect.
     

Share This Page