[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

    PunJedi


    @Acrobot Yes very sure. This is a Donator class member and they only have the chestchop create/sell/buy nodes.

    I also get the Towny error. No towny installed but it's acting like it is trying to hook into it and occasionally spits out
    the
    "cannot pass event Sign_Change to ChestShop"
     
  3. Offline

    Acrobot

    @PunJedi
    Please download the new ChestShop version. It should fix both Towny and cannot pass... errors.
    As for the LWC - can you post a screenshot of the sign+chest, and paste your ChestShop config on pastebin.com?
     
  4. Offline

    WolwX

  5. Offline

    rehdan

    [diamond]First thanks Acrobot for this excellent plugin.
    But I have a problem, the ID and the name Charcoal doesn't work, he can't recognize this items when i want to sell charcoal ??

    Thanks you for your help
     
  6. Offline

    Acrobot

    @rehdan
    On the last line, put either:
    charcoal coal
    or
    coal:1

    @WolwX
    Hmm, that is weird - I didn't change ANYTHING regarding shops in the official o.0
    Are you sure you have enough money? :)
    If not - could you tell me what economy plugin you use - it is a bug within it :p
     
  7. Offline

    WolwX

    I tested this afternoon, before you updated it :)
    So now your official like work fine for me :)
    Using iConomy 6
     
  8. Offline

    Acrobot

    @WolwX
    Oh, iConomy 6 like(s/d?) to do that. I got some reports, also other plugins experienced this. I would post it as a bug to the iConomy bug tracker.
     
  9. Offline

    WolwX

    @Acrobot

    After some others tests ^^'

    I came again, because this bug is random, and I have found this into my server.log =>

    Code:
    22:05:45 [SEVERE] Could not pass event SIGN_CHANGE to ChestShop
    java.lang.NullPointerException
    at com.Acrobot.ChestShop.Utils.uTowny.isInsideShopPlot(uTowny.java:18)
    at com.Acrobot.ChestShop.Utils.uTowny.canBuild(uTowny.java:26)
    at com.Acrobot.ChestShop.Listeners.signChange.onSignChange(signChange.java:93)
    at org.bukkit.plugin.java.JavaPluginLoader$35.execute(JavaPluginLoader.java:483)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:1045)
    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:92)
    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)
    >
    22:05:49 [SEVERE] Could not pass event SIGN_CHANGE to ChestShop
    java.lang.NullPointerException
    at com.Acrobot.ChestShop.Utils.uTowny.isInsideShopPlot(uTowny.java:18)
    at com.Acrobot.ChestShop.Utils.uTowny.canBuild(uTowny.java:26)
    at com.Acrobot.ChestShop.Listeners.signChange.onSignChange(signChange.java:93)
    at org.bukkit.plugin.java.JavaPluginLoader$35.execute(JavaPluginLoader.java:483)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:338)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:1045)
    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:92)
    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)
    >
    So that's in relation with Towny :/
     
  10. Offline

    Acrobot

    @WolwX
    Do you use TOWNY_INTEGRATION?
    Does ChestShop show that it loaded Towny at startup?
     
  11. Offline

    WolwX

    Here it's my configuration =>

    Code:
    PREFERRED_ECONOMY_PLUGIN: "iConomy"
    #Preferred economy plugin (iConomy, BOSEconomy, Essentials). If you do not want to specify this, leave it blank.
    REVERSE_BUTTONS: true
    #If true, people will buy with left-click and sell with right-click.
    ALLOW_LEFT_CLICK_DESTROYING: true
    #If true, if you left-click your own shop sign you won't open chest's inventory, but instead you will start destroying the sign.
    STACK_UNSTACKABLES: false
    #If true, ALL things (including food, etc.) will stack up to 64
    SERVER_ECONOMY_ACCOUNT: "STAFF"
    #Economy account's name you want Admin Shops to be assigned to
    ADMIN_SHOP_NAME: "ServeurShop"
    #First line of your admin shop should look like this
    SHOP_CREATION_PRICE: 0
    #Amount of money player must pay to create a shop
    LOG_TO_FILE: false
    #If true, plugin will log transactions in its own file
    LOG_TO_CONSOLE: true
    #Do you want ChestShop's messages to show up in console?
    LOG_TO_DATABASE: false
    #If true, plugin will log transactions in EBean database
    GENERATE_STATISTICS_PAGE: false
    #If true, plugin will generate shop statistics webpage.
    STATISTICS_PAGE_PATH: "plugins/ChestShop/website.html"
    #Where should your generated website be saved?
    RECORD_TIME_TO_LIVE: 600
    #How long should transaction information be stored?
    STATISTICS_PAGE_GENERATION_INTERVAL: 60
    #How often should the website be generated?
    USE_BUILT_IN_PROTECTION: true
    #Do you want to use built-in protection against chest destruction?
    PROTECT_CHEST_WITH_LWC: false
    #Do you want to protect shop chests with LWC?
    PROTECT_SIGN_WITH_LWC: false
    #Do you want to protect shop signs with LWC?
    MASK_CHESTS_AS_OTHER_BLOCKS: false
    #Do you want to mask shop chests as other blocks? HIGHLY EXPERIMENTAL, CAN LAG!
    SHOW_MESSAGE_OUT_OF_STOCK: true
    #Do you want to show "Out of stock" messages?
    SHOW_TRANSACTION_INFORMATION_CLIENT: true
    #Do you want to show "You bought/sold... " messages?
    SHOW_TRANSACTION_INFORMATION_OWNER: true
    #Do you want to show "Somebody bought/sold... " messages?
    TOWNY_INTEGRATION: true
    #Do you want to only let people build inside shop plots?
    And my server.log =>

    Code:
    22:27:41 [INFO] [ChestShop] Permissions version 3.1.6 loaded.
    >
    22:27:41 [INFO] [ChestShop] Towny version 0.76.1.12 loaded.
    >
    22:27:41 [INFO] [ChestShop] version 3.21 initialized!
    >
    22:27:41 [INFO] [ChestShop] iConomy 6 loaded.
    >
    22:27:41 [INFO] ==================== Towny ========================
    >
    22:27:41 [INFO] [Towny] Database: [Load] flatfile [Save] flatfile
    >
    22:27:41 [INFO] [Towny] Using: Permissions, Register, Questioner
    >
    22:27:41 [INFO] [Towny] Time until a New Day: 3 hours, 32 minutes, 18 second
    >
    22:27:42 [INFO] =============================================================
    >
    22:27:42 [INFO] [Towny] Version: 0.76.1.12 - Mod Enabled
    >
    22:27:42 [INFO] =============================================================
    >
    22:27:42 [INFO] Server permissions file permissions.yml is empty, ignoring it
    >
    22:27:42 [INFO] Done (0.303s)! For help, type "help" or "?"
    >
     
  12. Offline

    Acrobot

    @WolwX
    That sounds like Towny bug o.0
    Do you know what causes this error?
    Or, what was happening when it occured?
     
  13. Offline

    rockyct

    The strange thing is that I'm getting that bug too, but I'm not using Towny and the Towny portion of ChestShop is off.
     
  14. Offline

    Acrobot

    @rockyct
    Not possible (or is it?!) :)
    You probably experience other bug - like THIS - you have to re-download :)
     
  15. Offline

    rockyct

    Ah, ok, I'll do that.
     
  16. Offline

    darkcloud784

    We keep having an issue with the shops being created and protected by LWC but when you click on them they dont do anything. No errors no nothing, just says its protected by LWC.
     
  17. Offline

    gamemaster1494

    Can u make it to where u can have the sign 2 blocks away from the chest?
     
  18. Offline

    Acrobot

    @gamemaster1494
    I'll do that when I have time :)

    @darkcloud784
    Hmm, what is on your sign?
    Also, are you sure you are clicking the sign?
     
  19. Offline

    PunJedi

    Actually, your update fixed all our problems.

    Thank you very much. One last thing? A username is too long for the chestshop sign but wants to make a shop.

    Is there an option to just look at the sign and do a command such as /chestshop user (longname) item price amount etc??

    I know, I ask a lot :)
     
  20. Offline

    Acrobot

    @PunJedi
    The user just has to create the sign - it'll work with long names too!
    (If you're curious, that's what's "longName.storage" - that is sometimes generated - for :D)
     
  21. Offline

    darkcloud784

    It generates the name is what I'm saying we're putting things in, we've been using chestshop for a long time even before it was called chestshop

    <blank>
    <quanity>
    <B 12> (example for selling for 12 dollars)
    <item>

    It generates the name of person but when you click on the sign it doesnt do anything.
    We have tried right clicking and left clicking and it doesnt do anything.


    I wanted to add some details about my setup

    - CraftBukkit version: 1185
    - ChestShop version: 3.21
    - Your economy plugin: iConomy5
    - Have you got any Permission plugin? Permissions 3.1.6
     
  22. Offline

    pianoman22

    Does this plugin support Group Manager? Because that is all I use, and I would really love to keep it. If it doesn't, please Acrobot? :'(
     
  23. Offline

    _AMPLiFY

    Is there a way to see the transactions for a shop when you were offline. I am the owner of the server so I can check config files as well.
     
  24. Offline

    Donny

    Is now conflicting with lwc's economy addon . If you have both chestshop and lwc-economy and you attempt to put lwc on a chest (stand alone chest, no chestshop) it will give the following error
    Code:
    [LWC] Player_Interact: please notify an administrator.
     
  25. Offline

    briankdk

    Im under the expression that i just plant a sign and type "admin shop" and then people can buy at the sign.... is that wrong ?

    Do i have to build a house and plant the sign on the door, or ???

    please help...
     
  26. Offline

    briankdk

    ohhh... i totaly misunderstod the ADMINSHOP!

    i thought i would be a sign where you could choose between all items to buy....

    This video explains both types of shops:

    http://www.youtube.com/watch?v=B-CEjEHQ8tc
     
  27. Offline

    bond654

    @Acrobot
    I have written ChestShop and I tryed to run it without permission system but still not the same message comes up
    but can it be because I am using multiworld??
     
  28. Offline

    arnie231

    - CraftBukkit version B1185
    - ChestShop version 3.2
    - Your economy plugin BOSEconomy
    - Have you got any Permission plugin? Pex
    Cant create Free shops as OP i am typeing Adminshop,64,Free,1
    And it says it has created it but it doesnt work :S
     
  29. Offline

    Acrobot

    @pianoman22
    It supports GroupManager with FakePermissions (or if you use EssentialsGroupManager, it's named EssentialsFakePermissions or sth like that)

    @arnie231
    You need to type either
    B free
    or
    S free
    or both
    B free:free S

    @Donny
    Are you sure it's ChestShop's fault?
    Was that everything that it said? (It popped out in the console or chat? If chat, look into the console and tell me if you got an error, if so - paste it on pastebin.com)

    @_AMPLiFY
    There are 3 possibilities:
    LOG_TO_CONSOLE - outputs information about transactions to console
    LOG_TO_FILE - outputs information to file
    LOG_TO_DATABASE - outputs the information to database specified in bukkit.yml
    if you use any of these - you can find the transactions.

    @darkcloud784
    I'll check it now.

    @bond654
    Nope - should work fine.
    Also, can you post a screenshot of your plugin folder?

    @darkcloud784
    Sorry, I addressed the wrong person in that message, fixed this now. For your problem - did you try restarting (shutdown and turn on) the server? It might happen to be a bugged chunk - sometimes it happens :/
    Also, do you get any errors in console AND you are not sneaking, right?
     
  30. Offline

    SkayzenoX

    Hi,


    It's possible to add an option to change the writing on the signs? Add colors, change the text or other?

    And also an option to put a tax that goes into an account: p

    Sincerely,
    SkayzenoX
     
  31. Offline

    darkcloud784

    We have attempted to restart the server multiple times, we are not sneaking however today I did find out that it is working for some but not others, not sure if this matters but one of the people reporting it not working said they had a half chest in a while surrounded by woodplanks. Nothing on top of the chest/sign though.
     

Share This Page