[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

    _Robert

    I didn't :p.

    Mmm okey, so it can be iconomy then. I'll test this isolated in a test server with chestshop, iconomy5-6, boseconomy, with mysql and flatfiles and i'll let you know the results.

    Thanks :)
     
  3. Offline

    Acrobot

    @JoneKone
    I didn't add it, because the way Notch made it, it takes 2 characters from the sign, so every time you place 1 color (no character!) you're left with 13 characters to write. That would make certain things impossible :/
    However, I'll try making the amount go red/green.
     
  4. Offline

    JoneKone

    LocalShops do it by postprosessing the sign.. it adds the color afterwards. From config.yml
     
  5. Offline

    _Robert

    Was H2. Okey, i made the test and the problem it's the interaction layer between iconomy5 or 6 and MySQL. With flatfile works just fine (BOSEConomy too, but with mysql i think it dosen't close the conections to the db, so you must wait until java closes them.

    I'll take a look at the code of iConomy 6 to see if i can make something. The temporal solution to this would be to use flatfiles.

    Thanks for your time!
     
  6. Offline

    w7gamer

    Just can't make it work! keep geeting the "You can't buy here!" iConomy 6/Register, bPermissions, 1532 build Bukkit, worldguard. People can create shops (not sure if they are actually charged for it though) but noone can buy from them despite having the permissions. Shops located inside player owned wg regions.
     
  7. Offline

    mcferson

    For the french translation, i submit you this one, because the available one contains errors :
    Code:
    prefix: "&a[Shop] &f"
    iteminfo: "&aInformation sur l'Objet :&f"
    ACCESS_DENIED: "&4Vous n'avez pas la permission !"
    NOT_ENOUGH_MONEY: "Vous n'avez pas de quoi payer !"
    NOT_ENOUGH_MONEY_SHOP: "Le vendeur n'a pas de quoi vous payer !"
    NO_BUYING_HERE: "Vous ne pouvez pas acheter ici !"
    NO_SELLING_HERE: "Vous ne pouvez pas vendre ici !"
    NOT_ENOUGH_SPACE_IN_INVENTORY: "Vous n'avez plus de place dans votre inventaire !"
    NOT_ENOUGH_SPACE_IN_CHEST: "Il n'y a plus de place dans le coffre !"
    NOT_ENOUGH_ITEMS_TO_SELL: "Vous n'avez pas d'objet a vendre !"
    NOT_ENOUGH_STOCK: "Ce Magasin est vide."
    NOT_ENOUGH_STOCK_IN_YOUR_SHOP: "Votre Magasin de %material est vide !"
    YOU_BOUGHT_FROM_SHOP: "Vous avez achete %amount %item a %owner pour %price."
    SOMEBODY_BOUGHT_FROM_YOUR_SHOP: "%buyer vous achete %amount %item pour %price."
    YOU_SOLD_TO_SHOP: "Vous avez vendu %amount %item a %buyer pour %price."
    SOMEBODY_SOLD_TO_YOUR_SHOP: "%seller vous a vendu %amount %item pour %price."
    YOU_CANNOT_CREATE_SHOP: "Vous ne pouvez pas creer ce type de Shop !"
    NO_CHEST_DETECTED: "Impossible de trouver le coffre !"
    ANOTHER_SHOP_DETECTED: "Le Magasin d'un autre joueur est detecte !"
    CANNOT_ACCESS_THE_CHEST: "Vous n'avez pas la permission d'acceder a ce coffre !"
    PROTECTED_SHOP: "Le Magasin est protege par LWC !"
    SHOP_CREATED: "Le Magasin est cree !"
    NO_PERMISSION: "Vous n'avez pas la permission !"
    INCORRECT_ITEM_ID: "Vous avez specifie une ID invalide !"
    And i suggest (for french people) to prefer "Distributeur" or "Vitrine" instead of "Magasin". Just because it's more logical : there is no living vendor with a chest.
     
  8. Offline

    bobacadodl

    PLEASE make it possible (if it can even be done) to sell ENCHANTED ITEMS!!!
     
  9. Offline

    EnzomeLegions

    Now only ONE problem... how can we specify items such as 35:5 in the permissions file??
     
  10. Offline

    Acrobot

    @w7gamer
    "Can't buy here" means your sign is wrong. It needs to be either:
    B 5
    S 5
    B 5:5 S
    @EnzomeLegions
    You can't, atm.

    @bobacadodl
    I have to wait for Bukkit's API, but well - I'll try. It will probably be something like
    Diamond sword-5
    for 5th enchantment - as there is no way to directly check which enchantment it is.
    You know, I'm working on ChestShop 4 and I still have to update ChestShop 3 :/

    @mcferson
    Thanks :)
     
  11. Offline

    w7gamer

    Wrote before I saw your answer, I'll try.
    Thanks for your support!
     
  12. Offline

    pacN

    the permission thing doesnt work..
    The OP's can do everything
    and the DEFAULR group can do everything except SELL. they can't sell. and i dont want a full server woth OP's.
    How to make the default group being able to sell ?
    i use Essentials Group Manager! =)
    Help Needed !
     
  13. @pacN
    1. Post all your permission nodes of default group
    2. FAQ: Make sure:
    a) you added right permission nodes (are case-SensItiVe!)
    b) spawn-radius is set to "0"
     
  14. Offline

    pacN

    this is the defualt group permissions.
    Code:
    groups:
      Default:
        default: true
        permissions:
        - -bukkit.command.kill
        - ChestShop.shop.buy
        - ChestShop.shop.create
        - ChestShop.shop.sell
        - ChestShop.shop.use
        - iConomyChestShop.shop.use
        - essentials.help
        - essentials.helpop
        - essentials.list
        - essentials.mail
        - essentials.mail.send
        - essentials.motd
        - essentials.msg
        - essentials.rules
        - essentials.spawn
        - essentials.home
        - essentials.sethome
        inheritance:
        - g:essentials_default
        - g:bukkit_default
        info:
          prefix: '&e'
          build: true
          suffix: ''
    
    if anything is wrong can you write me a perm file that works =) ?
     
  15. Offline

    Acrobot

    @pacN
    Just like @VADemon said :) (thanks!)
    You need to go to bukkit.yml and change spawn-radius to 0.
     
  16. Offline

    graffiti36

    does this work on mc 1.0?
    also, which craftbukkit build can this run in?
     
  17. Offline

    pacN

    @Acrobot
    thank you so much. this works like a dream now =)
     
  18. Offline

    Acrobot

    @graffiti36
    This works on MC 1.0 fine -
    all the CraftBukkit builds you find should work fine with ChestShop.
    (By that, I mean #1000 (probably even more if you use Permissions 2/3) - #1545)
     
    Adrenaline likes this.
  19. Offline

    Adrenaline

    Bukkit Build: #1549
    Chestshop: 3.28

    PHP:
    2011-12-02 01:04:24 [SEVERECould not pass event BLOCK_PISTON_EXTEND to ChestShop
    java
    .lang.NullPointerException
        at com
    .Acrobot.ChestShop.Listeners.blockBreak.cancellingBlockBreak(blockBreak.java:35)
        
    at com.Acrobot.ChestShop.Listeners.blockBreak.onBlockPistonExtend(blockBreak.java:70)
        
    at org.bukkit.plugin.java.JavaPluginLoader$46.execute(JavaPluginLoader.java:577)
        
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
        
    at net.minecraft.server.BlockPiston.g(BlockPiston.java:75)
        
    at net.minecraft.server.BlockPiston.doPhysics(BlockPiston.java:52)
        
    at net.minecraft.server.World.k(World.java:520)
        
    at net.minecraft.server.World.applyPhysics(World.java:499)
        
    at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:53)
        
    at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:290)
        
    at net.minecraft.server.World.k(World.java:520)
        
    at net.minecraft.server.World.applyPhysics(World.java:498)
        
    at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:53)
        
    at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:290)
        
    at net.minecraft.server.World.k(World.java:520)
        
    at net.minecraft.server.World.applyPhysics(World.java:499)
        
    at net.minecraft.server.World.update(World.java:461)
        
    at net.minecraft.server.World.setTypeIdAndData(World.java:445)
        
    at net.minecraft.server.BlockDiode.a(SourceFile:67)
        
    at net.minecraft.server.World.a(World.java:2315)
        
    at net.minecraft.server.World.doTick(World.java:1738)
        
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:503)
        
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414)
        
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
    Block_piston_retract
    PHP:
    2011-12-02 01:04:25 [SEVERECould not pass event BLOCK_PISTON_RETRACT to ChestShop
    java
    .lang.NullPointerException
        at com
    .Acrobot.ChestShop.Listeners.blockBreak.cancellingBlockBreak(blockBreak.java:35)
        
    at com.Acrobot.ChestShop.Listeners.blockBreak.onBlockPistonRetract(blockBreak.java:78)
        
    at org.bukkit.plugin.java.JavaPluginLoader$45.execute(JavaPluginLoader.java:570)
        
    at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:58)
        
    at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:339)
        
    at net.minecraft.server.BlockPiston.g(BlockPiston.java:90)
        
    at net.minecraft.server.BlockPiston.doPhysics(BlockPiston.java:52)
        
    at net.minecraft.server.BlockPistonExtension.doPhysics(BlockPistonExtension.java:152)
        
    at net.minecraft.server.World.k(World.java:520)
        
    at net.minecraft.server.World.applyPhysics(World.java:499)
        
    at net.minecraft.server.BlockRedstoneWire.g(BlockRedstoneWire.java:53)
        
    at net.minecraft.server.BlockRedstoneWire.doPhysics(BlockRedstoneWire.java:290)
        
    at net.minecraft.server.World.k(World.java:520)
        
    at net.minecraft.server.World.applyPhysics(World.java:499)
        
    at net.minecraft.server.World.update(World.java:461)
        
    at net.minecraft.server.World.setTypeIdAndData(World.java:445)
        
    at net.minecraft.server.BlockDiode.a(SourceFile:63)
        
    at net.minecraft.server.World.a(World.java:2315)
        
    at net.minecraft.server.World.doTick(World.java:1738)
        
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:503)
        
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:414)
        
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
     
  20. Offline

    CesarSMX

    is this compatible with bPermissions?
     
  21. Offline

    Kane

    @Acrobot the errors also include explosions and more.
     
  22. Offline

    Acrobot

    @CesarSMX
    Yes.
    @Adrenaline
    @Kane
    Thanks, fixing that now. Apparently, while re-writing the block destruction code, I forgot about the cases where the block isn't destroyed by player :p
     
    Kane likes this.
  23. Offline

    bullshitninja

    Nice plugin, trying now.

    It would be nice to be able to tie this in with Factions, as it does with WorldGuard. The config parameter that can deny you building on unclaimed land, namely. Id like to be able to keep players from throwing down a shop on property they/their faction doesn't own.

    In fact, that would make this thing perfect!
     
  24. Offline

    CesarSMX

    Very nice plugin! im loving it! but i have a question,
    When you create an AdminShop, how do you change the first line name to a different one??, I changed it on the config but I don`t know if works like that, and always have to say "AdminShop"??? or there is a way to change it?

    I tried with the name that I wrote in config, but the admin shop is note created.

    Greetings!.
     
  25. Offline

    EnzomeLegions

    lol i figured it out XD i kinda derped, but its allll good nows XD
     
  26. Offline

    EnzomeLegions

    o just a note.. maybe try make it so the signs detect the chests a little more leniently. such as if i want to hide my chest and have my sign out.. XD Just gets annoying HAVING to place the sign above the chest :p
     
  27. Offline

    CesarSMX

    OMG! everything was working fine! until I got this error.

    Code:
    [SEVERE] Error occurred while enabling ChestShop v3.29 (Is it up to date?): special characters are not allowed
    unacceptable character '?' (0xFFFD) special characters are not allowed
    in "<reader>", position 243
        at org.yaml.snakeyaml.reader.StreamReader.checkPrintable(StreamReader.java:98)
        at org.yaml.snakeyaml.reader.StreamReader.update(StreamReader.java:191)
        at org.yaml.snakeyaml.reader.StreamReader.<init>(StreamReader.java:63)
        at org.yaml.snakeyaml.Yaml.load(Yaml.java:423)
        at org.bukkit.util.config.Configuration.load(Configuration.java:89)
        at com.Acrobot.ChestShop.Config.ConfigObject.reloadLanguage(ConfigObject.java:42)
        at com.Acrobot.ChestShop.Config.ConfigObject.<init>(ConfigObject.java:25)
        at com.Acrobot.ChestShop.ChestShop.onEnable(ChestShop.java:49)
        at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:188)
        at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:957)
        at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:280)
        at org.bukkit.craftbukkit.CraftServer.loadPlugin(CraftServer.java:182)
        at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:165)
        at net.minecraft.server.MinecraftServer.t(MinecraftServer.java:337)
        at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:324)
        at net.minecraft.server.MinecraftServer.init(MinecraftServer.java:161)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:388)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:457)
    How do I fix that?
     
  28. Offline

    Acrobot

    @CesarSMX
    You probably coded your config (language one) in incorrect way, or you had special characters in it.
    Just delete the file, ChestShop should re-generate it, then you can modify it again.

    And to change the name, there is (in config) "ADMIN_SHOP_NAME". Just set it to something else :)

    @EnzomeLegions
    Well, you don't need to place the sign above the chest - it must be in a 1 block radius.
    For example, it can be below your chest :)

    @bullshitninja
    Yeah, planned
    http://dev.bukkit.org/server-mods/chestshop/tickets/8-add-factions-support/
     
  29. hi Acrobot

    i have minecart mania, and chestshop and i does get the error that other users is getting.

    here is my info:

    Craftbukkit: Craftbukkit version git-Bukkit-1.8.1-R4-62-gdc48657-b1538jnks (MC: 1.0.0) (Implementing API version 1.0.0-R1-SNAPSHOT)
    Chestshop: ChestShop's version is: 3.29
    iConomy: iConomy version 6.0.8b
    MinecartManiaCore: MinecartManiaCore version 1.2.8
    bPermissions: bPermissions version 1.8.2b


    do you know about an work around or something else?
     
  30. Offline

    cr0ss

    @Acrobot

    Hi there. Is there perhaps any chance you could make it so people in creative mode cannot sell to the shops? Or perhaps a toggle in the config for this?
     
  31. Offline

    Acrobot

    @zyxep
    WHAT error do you get?
    @cr0ss
    If you have any permission plugin, you should use it to disallow ChestShop.shop.sell for people in creative mode.
     

Share This Page