[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

    Kuboken
    Yep, do /iteminfo.
    Also, I have just fixed the armour enchants :p

    xcjen
    ...
    really?
    There should even be an error in console saying what to do.

    Go to bukkit.yml, change spawn-radius to 0.

    TomdebomPC
    Your 3rd sign line is wrong.
    It should be either
    B 5
    S 5
    B 5:5 S
     
  3. Offline

    xduckxx

    Acrobot
    for some reason users cant buy from the admin shop, only a few signs work. but every sign in the admin shop allows the player to sell to it.. I have the latest version of ChestShop and this has been giving me problems since the minecraft 1.2.3 update.. I have all the signs set up like this:
    Admin
    1
    B #:# S
    [Item]

    and the permissions are

    Member:
    default: false
    permissions:
    - ChestShop.shop.*
    - essentials.help
    - ChestShop.shop.buy
    - ChestShop.shop.sell
    - ChestShop.shop.create
    inheritance:
    - Default
    info:
    prefix: '&a'
    build: true
    suffix: ''

    Im using the Essentials GameManager Permissions.
     
  4. Offline

    Acrobot

    xduckxx
    Have you got any errors in the console?

    What do you mean by "can't buy/only few signs work"?
     
  5. Offline

    xduckxx

    Acrobot
    No errors, and exactly that. some signs allow both buying and selling while others only allow selling. They are all set up the same
     
  6. Offline

    Acrobot

    xduckxx
    But what do you mean "can't buy"?
    Does it say anything in the chat?
    Also, what button do you use to buy?
     
  7. Offline

    xduckxx

    @ acrobot
    It just doesnt do anything when i left-click to buy.
    No, nothing pops up in the chat either.
    left click to but, right click to sell.
     
  8. Offline

    Acrobot

    xduckxx
    Go to bukkit.yml, change spawn-radius to 0.
     
  9. Offline

    Doidle

    Acrobot,
    I'm having the following issue on my server.
    When I try to sell Moss Stone on my server in a Admin Shop I cannot.
    Its because Mossy_Cobblestone is way to long.
    I tried Moss Stone allready but when I click it makes me sell stone instead of moss stone.
    is there any different name for moss stone? maybe with a _ ?
     
  10. Offline

    Acrobot

    Doidle
    Do /iteminfo
    Just write as much as you can on the sign.
     
  11. Offline

    Doidle

  12. hi, i was wondering if u knew why no one can buy or sell items (interact with sign).
    when i do sign it says "shop created" or whatever. but when i right or left click. it just says sign protection by kayc01.
    and nothing to do with chest shop. my spawn radius is 0 and ive looked in config for ages. any help will be appreciated.
     
  13. Offline

    Acrobot

    kayc01
    Well, first step would be to update your economy plugin, which is probably iConomy.
     
  14. it was up to date and i even installed latest build just incase but still nothing. so we are back where we started :(
     
  15. Offline

    Acrobot

    kayc01
    Well, are you in creative mode?
     
  16. i change out of creative cos i dont wanna destroy it. lol. same for every one in survival to tho.
    :/
     
  17. Offline

    Acrobot

    kayc01
    Really?
    Try, for a moment, turning off IGNORE_CREATIVE_MODE in the config.

    Also, are you sure you don't get any errors in the console at startup/whatever?

    The last thing I can think of is to install vault.
     
  18. Offline

    MrGKanev

    Why dosen't it worlk with multyverse?
     
  19. vault is up to date and already on.
    ill check now for errors. + do u think it could be a plugin like essentials protect interfearing
     
  20. this is the error i get when left clicking on sign:
    ... 12 more
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor4661.invoke(Unknown Source)
    at com.Acrobot.ChestShop.Listeners.playerInteract.onPlayerInteract(playerInteract.java:78)
    at com.Acrobot.ChestShop.Config.Config.getBoolean(Config.java:17)
    Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:554)
    at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:116)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
    at net.minecraft.server.Packet14BlockDig.handle(SourceFile:43)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:623)
    at net.minecraft.server.ItemInWorldManager.dig(ItemInWorldManager.java:92)
    at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:168)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:441)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:303)
    org.bukkit.event.EventException
    2012-03-18 11:03:18 [SEVERE] Could not pass event PlayerInteractEvent to ChestShop
     
  21. Offline

    Acrobot

    MrGKanev
    What do you mean by "doesn't work"?

    kayc01
    In your config, you have set the "REVERSE_BUTTONS" to some value other than true or false.
     
  22. ok we got somewhere but not solved still.
    i had it to : fasle
    so that was a mistake. changed it to false.i then reloaded. i made a new sign and when i click to buy. it just says : [Protection] : kayc01
    (essentailsProtect). but when i click to sell. it says you cant sell here. probs cos of i did not specify that u can sell.
    (i did : b10 and not include s 30) so i think i will remove essentials protect
    thx ill report what happens
     
  23. still getting same error.
    2012-03-18 14:18:59 [INFO] <FaZe [Mod]ethe334> CAN YOU ENEMY DRAGONBORN
    2012-03-18 14:18:53 [INFO] skullz28 [/86.9.246.80:52010] logged in with entity id 8295 at ([Midsummer] -1781.490497394681, 69.0, 1659.5695839202351)
    ... 12 more
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source)
    at com.Acrobot.ChestShop.Listeners.playerInteract.onPlayerInteract(playerInteract.java:80)
    at com.Acrobot.ChestShop.Shop.ShopManagement.buy(ShopManagement.java:24)
    at com.Acrobot.ChestShop.Shop.Shop.buy(Shop.java:57)
    at com.Acrobot.ChestShop.Economy.Economy.hasEnough(Economy.java:48)
    at com.Acrobot.ChestShop.Economy.Vault.hasEnough(Vault.java:22)
    at net.milkbowl.vault.economy.plugins.Economy_iConomy6.has(Economy_iConomy6.java:149)
    at net.milkbowl.vault.economy.plugins.Economy_iConomy6.getBalance(Economy_iConomy6.java:123)
    at com.iCo6.system.Accounts.exists(Accounts.java:10)
    at com.iCo6.system.Queried.hasAccount(Queried.java:237)
    at com.iCo6.system.Queried.useMiniDB(Queried.java:92)
    Caused by: java.lang.NullPointerException
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:554)
    at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:116)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
    at net.minecraft.server.Packet15Place.handle(SourceFile:39)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:722)
    at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:285)
    at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:168)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:441)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:303)
    org.bukkit.event.EventException
    2012-03-18 14:18:52 [SEVERE] Could not pass event PlayerInteractEvent to ChestShop
     
  24. Offline

    DrNoD

    Hi, if a set u a shop, with item sell count of 1728 (on chest)
    and someone buys it, he has MUCH more in Inventory. He can duplicate as much as he want.
    Someone else with this problem?
     
  25. Offline

    rubberducky42

    Finally I found a shop plugin. Does this add currency to the game?
     
  26. Offline

    Acrobot

    kayc01
    iConomy error, try deleting iConomy's config.

    DrNoD
    Hmm, I don't think that's possible. You know it's 27 stacks, right? That's the whole player's inventory, so he can't really have more than that.

    rubberducky42
    Well, nope.
    To add currency, you have to use any of the economy plugins.
    For example:
    - iConomy (http://dev.bukkit.org/server-mods/iconomy/)
    - BOSEconomy (http://dev.bukkit.org/server-mods/boseconomy/)

    If you want to use other plugins, you have to also install Vault (http://dev.bukkit.org/server-mods/vault/)
     
  27. Offline

    senior_hombre

    LWC is not in the requirements does this mean that even without noone can open the chests and steal from it?

    I did not tried this plugin out, so i do not know how this buying and selling works, did the customers open the chests and take or put it what they want and automaticly get or loose money? Or do they have to click on the signs? Or the chests but they do not open?
    Is stealing possible without LWC?
     
  28. Offline

    DrNoD

    @ Acrobot: The Problem is, that the User gets Items in the Inventory with no Stacknumber. He can duplicate it as much as he want. (unlimited stack item)
    We are using Craftbukit++
    Can someone check it?
     
  29. Offline

    Acrobot

    senior_hombre
    Nope. There is built-in protection.
    The customers have to click on the sign, and they can't open the chests.

    DrNoD
    Well, I think that CB++ might be doing something to the itemstacks, but I'm not sure.
    I have just tested this on my server (CB #2060) and :
    - when I buy from player shops, I get exactly 1728 items, the stack number is visible.
    - when I buy from admin shops, I also get exactly 1728 items with stack number visible
     
  30. Offline

    MrGKanev

    Acrobot it dosen't work like it is in one of the created worlds by multyverse and the people and me cant buy or sell I set the permissions 20 days ago.
     
  31. Offline

    Wyrd

    Hey Acrobot, I'm having a problem on my server. When anyone buys/sells an item to a shop, it puts/takes the item out of the shop but doesnt give/take items from the players inventory. It does affect the players balance though.

    Also, when I buy or sell i get this in terminal:


    11:43:41 [SEVERE] Could not pass event PlayerInteractEvent to ChestShop
    org.bukkit.event.EventException
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:303)
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:441)
    at org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:168)
    at net.minecraft.server.ItemInWorldManager.interact(ItemInWorldManager.java:285)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:722)
    at net.minecraft.server.Packet15Place.handle(SourceFile:39)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:116)
    at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:554)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
    Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 0
    at java.util.ArrayList.RangeCheck(ArrayList.java:547)
    at java.util.ArrayList.get(ArrayList.java:322)
    at com.iCo6.util.Common.formatted(Common.java:125)
    at com.iCo6.iConomy.format(iConomy.java:504)
    at com.nijikokun.register.payment.forChestShop.methods.iCo6.format(iCo6.java:39)
    at com.Acrobot.ChestShop.Economy.Register.format(Register.java:32)
    at com.Acrobot.ChestShop.Economy.Economy.formatBalance(Economy.java:56)
    at com.Acrobot.ChestShop.Shop.Shop.buy(Shop.java:98)
    at com.Acrobot.ChestShop.Shop.ShopManagement.buy(ShopManagement.java:28)
    at com.Acrobot.ChestShop.Listeners.playerInteract.onPlayerInteract(playerInteract.java:80)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:301)
    ... 12 more
    >
     

Share This Page