[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

    Kainzo

    http://pastie.org/3082105
    Ahh! (latest)
     
  3. Offline

    Mishrathium

    @Acrobot
    That answers it.

    If there is a possibility in the future to add a configuration to just check for if the player is a RESIDENT of the town and its a SHOP plot.. that would be amazing. (disabling the owner part in a config)

    Since towny plots average around 16x16, players could build a large shop with multiple people rather than having each individual person have to be a plot owner.

    Thank you for all your information and your amazing plugin!
     
  4. Offline

    Acrobot

    @Mishrathium
    Could do that :)

    @Kainzo
    I literally have no clue what's happening :/
    Was the player in the creative mode when it happened?

    What I do:
    1. When a sign is placed, give me an itemStack of the item from the 4th line.
    2.
    Code:
    String[] split = itemName.split(":|-"); 
    3. I am trying to access the 1st part of the itemName, so I do split[0] - which should always work.
    4. Ta-dah - error?
     
  5. Offline

    hayabusha

    I think...
    In order to preserve the balance of the game.
    Possession limit of money you can decide what to trade in that range.
    I want this feature to work
     
  6. Offline

    Mishrathium

    @Acrobot

    Amazing and thank you, happy to test any Dev builds you have. I think this would also make any servers using towny have your chest shops be the clear (only!) choice to use!
     
  7. Offline

    Acrobot

    @hayabusha
    Excuse me, but I still don't understand.
    Does it mean that if you reach the cutoff, it doesn't let you sell anymore?

    @Mishrathium
    Finishing the plugin now.
     
  8. Offline

    Acrobot

  9. Offline

    Euthyphro

    I have the oddest bug with chestshop and I see a few other players have this problem. Some of my players can use chestshop no problem, meanwhile others cannot. The permissions file I have is below doesnt appear to have any problems and parses fine with permissionex, however, the thing is that some members can use it no problem meanwhile others cannot. I think there might be an actual bug with the plugin not handling large user lists well since my permissions list has over 100 users (list not included here for privacy).

    *edit* just tried again, some members in the member group can make chest shops fine, meanwhile others cannot. For example, on the list below, Scholar cannot meanwhile Cratylus has no problem making chest shops.

    I just sent you a little donation for your hard work, more to come if this can be fixed. Thanks ;)

    Code:
    groups:
        default:
            default: true
            prefix: '&7'
            suffix: '&f'
            permissions:
            - modifyworld.chat
            - modifyworld.chat.private
            - commandbook.motd
            - modifyworld.entity.damage.take.*
        member:
            prefix: '&b'
            suffix: '&f'
            inheritance:
            - default
            permissions:
            - ChestShop.shop.buy
            - ChestShop.shop.sell
            - ChestShop.shop.create
            - modifyworld.*
            - iConomy.holdings
            - iConomy.payment
            - lockette.user.create.*
            - multiverse.core.coord
            - multiverse.access.*
            - stargate.world.*
            - stargate.network.central
            - stargate.network.nether
            - stargate.world.*
            - stargate.network.Nether-Net
            - commandbook.kit.kits.minecart
            - okchat.who
            - okchat.whisper
            - okchat.reply
            - okchat.persistentpm
        iron:
            prefix: '&6'
            suffix: '&f'
            inheritance:
            - member
            permissions:
            - commandbook.biome
            - okchat.dnd
            - okchat.emote
            - okchat.ignore
        gold:
            prefix: '&e'
            suffix: '&f'
            inheritance:
            - iron
            permissions:
            - multiverse.core.spawn.self
            - signColours.*
        diamond:
            prefix: '&9'
            suffix: '&f'
            inheritance:
            - gold
            permissions:
            - commandbook.time.player
            - simplehat.*
        mod:
            prefix: '&a'
            suffix: '&f'
            inheritance:
            - diamond
            permissions:
            - lagmeter.command.lag
            - commandbook.teleport
            - logblock.lookup
            - logblock.spawnTools
            - logblock.tools.tool
            - logblock.tools.toolblock
            - commandbook.mute
            - commandbook.kick
            - commandbook.bans.ban
            - commandbook.bans.unban
            - commandbook.bans.isbanned
            - commandbook.home.teleport
            - commandbook.home.set
        admin:
            prefix: '&c'
            suffix: '&f'
            inheritance:
            - mod
            permissions:
            - lagmeter.*
            - lockette.admin.snoop
            - lockette.admin.bypass
            - dynmap.marker.*
            - ChestShop.admin
            - logblock.*
            - stargate.*
            - ChestShop.admin
            - iConomy.*
    users:
        'Scholar':
            group:
            - member
        'Euthyphro':
            group:
            - admin
        'Cratylus':
            group:
             - member
    
     
  10. Offline

    Acrobot

    @Euthyphro
    Have you tried going to bukkit.yml and changing spawn-radius to 0?
    Also - does anything else - like LWC - work in that chunk?

    What exactly do you mean by "cannot create shops"?
     
  11. Offline

    Euthyphro

    What I mean is that as soon as the sign is placed above the chest, it says "[Shop] You do not have permissions to access this chest".

    We aren't using LWC, we use lockette, which isn't having any problems. It is such a bizarre problem because it works for most players but some experience this glitch, even though they are all on the same permissions group. I've even tried re-ordering the player names to see if it was happening after a certain player on the permissions list, but it is just random players that can't build chests.

    bukkit.yml is set to 0 and it isn't a chunk issue as this problem is global for the affected players. Also, I've tried deleting the player.dat file of affected players, but still same problem where as soon as they place a chest, it says they do not have permissions to access the chest.
     
  12. Offline

    Acrobot

  13. Offline

    hayabusha

    That's correct.
    Because the machine translation, Sorry for confusing.
     
  14. Offline

    Acrobot

    @hayabusha
    Hmm, I'll try doing that when I switch to Vault (If I will).
     
  15. Offline

    Acrobot

    sean_skroht and Euthyphro like this.
  16. Offline

    sean_skroht

  17. Offline

    aron123

    Admin Shop not working. Admin Shop name is Server. If i create admin shop (Server): Couldn't find a chest! I'm admin on this server and i have permissions '- ChestShop.admin.*'. And i can't open other shop chests.

    Sorry, my english is bad :(:(



    CraftBukkit version: This server is running Craftbukkit version git-Bukkit-1.0.1-R1-b1597jnks (MC: 1.0.1) (Implemnting API version 1.0.1-R1)
    - ChestShop version: ChestShop's version is: 3.31
    - Your economy plugin (iConomy? BOSEconomy? iConomy
    - Have you got any Permission plugin? Which one? PermissonsEx
     
  18. Offline

    Acrobot

    @sean_skroht
    No problem, thanks :)

    @aron123
    What does your config look like?
    Can you paste it on pastebin.com?

    Also - the admin permission is
    ChestShop.admin​
    AFAIK, ChestShop.admin.* WON'T work.
     
  19. @Acrobot
    I think it's a good idea to change to Vault because Register went inactive and Vault seems to have more features.
     
  20. Offline

    Gulogomi

    I have a little problem.. I cant create shops, i have the lates craftbukkit ,iconomy and Chestshop!

    Thanks in advance!
     
  21. Offline

    Acrobot

    @VADemon
    Yeah, but with Vault, they users would have to download it additionally to the ChestShop, and honestly, tell me - how many users wouldn't do that, even if it was written? I'd have to ask the Vault guys to let me pack ChestShop with Vault.

    @Gulogomi
    What do you mean by "can't create shops"?
    Are you running the latest CraftBukkit and ChestShop?
    What errors do you get?
     
  22. Offline

    Sich

    Any idea for the next update ?
    For this issue :
    - user with the perm ChestShop.name.<name> can access the chest, without the need to be admin.
    - user with the perm Chest.group.<group> can create restricted shop, without the need to be admin.

    Thanks :)
     
  23. Offline

    Acrobot

  24. Offline

    Sich

    Fantastic, you are very very efficient ! :)
     
  25. Offline

    tomshark8

    How do I make wooden planks as it is 2 words?!?!?
     
  26. Offline

    Acrobot

    @tomshark8
    Just do /iteminfo
    As far as I can remember, it's "wood" (without quotation marks)
     
    tomshark8 likes this.
  27. Offline

    tomshark8

    ty for your VERY quick response
     
  28. Offline

    Don Redhorse

    DON'T EVER DO THAT!!!! Even putting register into your own jar without renaming the packagename is a bad idea which finally dawned to Niji...

    People will download vault... it is a drop in for an admin.. and just works..

    Register packed into different plugins with different versions caused already a lot of issues.. and Niji left the building... again..

    oh, btw: I like your plugin
     
  29. Offline

    Acrobot

    @Don Redhorse
    I think you didn't understand my post :)
    I renamed the package in register, that's one.
    The 2nd one, is I want to pack ChestShop.zip with Vault.jar, so in ChestShop.zip, there'll be:
    - ChestShop.jar
    - Vault.jar
    - Sample Files

    :)
    I know - I helped Niji get the Register up and running, unfortunately it didn't work that well. And thanks :)
     
  30. Offline

    Don Redhorse

    oh cool.... well THAT would be nice... looking forward to it..
     
  31. Offline

    Gulogomi

    @Acrobot

    It do not say: Shop created Sussesful, and we cant buy from it. And i have the latest craftbukkit and chestshop.
    Sorry for my bad english :/
     

Share This Page