[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


    An easy way to create shops - no protection plugin needed!
    You don't need to be on-line to earn money anymore!
    I've put a LOT of effort into making this plugin,
    you can donate if you appreciate my effort =)

    - An economy plugin supported by Register or Vault, for example iConomy, BOSEconomy or Essentials Eco.
    - 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

    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.

    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/

    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:

    (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:

    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:
    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)

    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)

    If you want to delete your old shop, simply SNEAK and destroy the sign.
    It's that easy =)

    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?

    Changelog (open)

    Changelog can be found on BukkitDev - http://dev.bukkit.org/server-mods/chestshop/files/
  2. Offline


    Not sure if this is just me or what but when I set up my shops there are some items that wont sell. For example, when I try to sell a Wooden Door in my shop it tells the buyer its out of stock when its not. Same goes for the brewing stand. I also typed in the IDs on the signs to make sure I didn't mess up spelling or anything. Still wont sell. Help please?
  3. Offline


    From OP:

    "[...] please give me this information, so I can help you.
    - 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?"
  4. Offline


    ***After starting from scratch with PEX using MySQL, everything seems to be in order now. Must have been user error along the way. Great plugin. Thanks!***

    First post here, sorry if it's in the wrong place. At one point was able to create ChestShop but clicking sign did nothing. No message, no error, just nothing. Trying to open chest gave permission error as expected.

    Not sure what changed, but now it's telling me Couldn't find a chest.

    EDIT 3: I didn't realize there had been an empty sign above the chest. Don't I feel lame? But still, nobody can buy or sell by clicking a sign. It has to be a permissions thing, right?

    I'm not sure which plugin could be causing the trouble.

    Working with:
    ChestShop v3.64
    BOSEconomy v0.7.8.1
    PEX v1.20.4
    Vault v1.2.27
    MCPC+ version git-MCPC-Plus-jenkins-MCPC-Plus-92 (MC: 1.6.2) (Implementing API version 1.6.2-R-1.1-SNAPSHOT)

    Other Plugins:
    Multiverse-Core Portals & Inv

    On Pastebin to save clutter:
    permissions.yml (some alignment appears off on pastebin, but it parses without errors)

    ChestShop config.yml


    I've done more than a fair share of Googling but can't seem to figure this out just yet.
    Can anyone see what I might be doing wrong here? Please let me know if you need more info.


    EDIT: Updated pastebin links
    EDIT 2: Removed ChestShop.* from my user and left it in group perms. Now I can create a ChestShop but other user can't buy or sell. Clicking sign does nothing but trying to open chest gives permission error.
  5. Offline



    Great work dude! I play on an economy server and I have a rank that allows u to use this awesome plugin! And I also run a server and so far its been great for that too! Thx soooooo much!
    Acrobot likes this.
  6. Offline


    Thank you for the kind words :) I am trying to do my best!
  7. Offline


    I advise you to add a LWC private removal after removing signs and chest.

    1. package com.Acrobot.ChestShop.Listeners.PostTransaction;
    3. import com.Acrobot.Breeze.Utils.InventoryUtil;
    4. import com.Acrobot.ChestShop.Configuration.Properties;
    5. import com.Acrobot.ChestShop.Events.TransactionEvent;
    6. import com.Acrobot.ChestShop.Signs.ChestShopSign;
    7. import com.Acrobot.ChestShop.Utils.uBlock;
    8. import com.griefcraft.lwc.LWC;
    9. import com.griefcraft.model.Protection;
    10. import org.bukkit.Material;
    11. import org.bukkit.block.Chest;
    12. import org.bukkit.block.Sign;
    13. import org.bukkit.event.EventHandler;
    14. import org.bukkit.event.EventPriority;
    15. import org.bukkit.event.Listener;
    16. import org.bukkit.inventory.Inventory;
    17. import org.bukkit.inventory.ItemStack;
    19. /**
    20. * @author Acrobot
    21. */
    22. public class EmptyShopDeleter implements Listener {
    24. @EventHandler(priority = EventPriority.HIGHEST)
    25. public static void onTransaction(TransactionEvent event) {
    26. if (event.getTransactionType() != TransactionEvent.TransactionType.BUY) {
    27. return;
    28. }
    30. Inventory ownerInventory = event.getOwnerInventory();
    32. if (!shopShouldBeRemoved(ownerInventory, event.getStock())) {
    33. return;
    34. }
    36. Sign sign = event.getSign();
    37. sign.getBlock().setType(Material.AIR);
    39. LWC ELUUC = LWC.getInstance();
    40. Protection prot = ELUUC.findProtection(event.getSign().getBlock());
    41. if (prot != null) {
    42. prot.remove();
    43. prot.removeAllPermissions();
    44. prot.removeCache();
    45. }
    47. if (Properties.REMOVE_EMPTY_CHESTS && !ChestShopSign.isAdminShop(ownerInventory) && InventoryUtil.isEmpty(ownerInventory)) {
    48. Chest connectedChest = uBlock.findConnectedChest(sign);
    49. connectedChest.getBlock().setType(Material.AIR);
    51. prot = ELUUC.findProtection(connectedChest.getBlock());
    52. if (prot != null) {
    53. prot.remove();
    54. prot.removeAllPermissions();
    55. prot.removeCache();
    56. }
    58. } else {
    59. ownerInventory.addItem(new ItemStack(Material.SIGN, 1));
    60. }
    61. }
    63. private static boolean shopShouldBeRemoved(Inventory inventory, ItemStack[] stock) {
    64. return Properties.REMOVE_EMPTY_SHOPS && !ChestShopSign.isAdminShop(inventory) && !InventoryUtil.hasItems(stock, inventory);
    65. }
    66. }
  8. Offline


    Shouldn't LWC already do this by default?
  9. Offline


    No. Remain ghost privates LWC.
  10. Offline


    Okay, thank you. Mind creating a ticket for it?
  11. Offline


    do not need a ticket, I informed the developers))) is the main thing.
    I always re-write plug-ins for your project.
  12. Offline


    Well, ok then. Tickets help me manage my time and remember to include all fixes in the next release of ChestShop.
  13. Acrobot
    I don't know whether it was asked yet, but do you know that CS doesn't work with modded items? (MCPC server)
    Will you implement the support of custom mods/inventories?
    And hello again :)
  14. Offline


    Hello again!

    Nope, I wasn't aware, however there's nothing really that I can do about it. MCPC implements modded items in a way that doesn't really work with Bukkit.

    You could try doing /iteminfo - what happens when you execute it while holding a modded item?
  15. Offline


    Acrobot Ok... Well, I'm on this server that uses ChestShop (V 3.5), but for some odd reson, Hoppers CAN'T TAKE ITEMS FROM THE SHOPS! I was wondering why this happens... I know it's not the server, because if I remove the shop, the hopper and the chest works fine. Please tell me if there is a way to allow hoppers to take from shops. Thanks!
  16. Offline


    Probably because:
    - you're using an outdated ChestShop version (though that is unrelated to your problem)
    - there's a setting in the config that disables this protection, however it is on by default (because, who actually would like their stuff to be stolen?)
  17. Offline


    This protection disables hoppers from accessing Chest Shops? The server I'm using uses PlotMe, so I can't see why they'd have that on...
  18. Offline


    And what happens when you put the ID on the sign?

    Yes, by default this protection prevents hoppers from accessing ChestShops.
  19. Offline


  20. Well, then it's MCPC+ (bukkit port to support mods) that's not supporting chest/inventories yet :/
    Thank you for clarifying that!
  21. Hello, I have a problem with this plugin. I have all the permits made (use permissionsEX) settings I think everything is fine. but when I try to create a normal store or Admin tells me "you can not create This Type of shop" any solution?

  22. Offline


    Unfortunately, I believe your permission file might be wrong.
  23. Acrobot
    I've checked the permits of ChestShop and I have not found an error in the permits. Might you tell me what is wrong? regards

        default: true
        - ChestShop.shop.*
        - ChestShop.shop.create
        - ChestShop.shop.buy
        - ChestShop.shop.sell
        - ChestShop.nofee
        - ChestShop.shop.create.buy
        - ChestShop.shop.create.sell
        - ChestShop.shop.create.*
        default: false
        prefix: '&1[&4Admin&1]&7 '
        - ChestShop.shop.*
        - ChestShop.shop.create
        - ChestShop.shop.buy
        - ChestShop.shop.sell
        - ChestShop.nofee
        - ChestShop.shop.create.buy
        - ChestShop.shop.create.sell
        - ChestShop.shop.create.*
        - ChestShop.mod
        - ChestShop.admin
  24. Offline


    Hmm, the permissions are fine. Which ChestShop version are you running? Could you send me your ChestShop's config.yml file (via pastebin)?
  25. Offline


    Which ChestShop version?

    Also, make sure you aren't trying to place more than 1 shop on one block - you've got a setting in config.yml turned off.
  26. Acrobot
    I have installed the latest version of ChestShop and last Vault.

    I changed it to put several stores in one block and still not work for me

  27. Offline


    Hmm, that is weird. Could you PM me your server's IP so I can try to connect and resolve your issue?
  28. Offline


    I have a little problem. Help me to resolve it! For information, i turn on spigot and my server is in a bungeecord
    My pastbin: http://pastebin.com/7buBjjGr
    Thank you

Share This Page