[INACTIVE][ECON] SimpleShop [1.41] - An iConomy Shop [493-531]

Discussion in 'Inactive/Unsupported Plugins' started by Nijikokun, Jan 23, 2011.

  1. Offline

    Nijikokun

    SimpleShop (1.41) (iConomy 4.4+ & Permissions or Op(s).txt)(Donate)
    Download the latest release. (Jar)

    What is SimpleShop?
    Simple shop is... well a simple global shop that allows you to add, update, and reload in game.
    Natively supporting MySQL & SQLite.

    Install:
    1. You need iConomy & Permissions to use this plugin.
    2. Download the archive, extract the files to your base craftbukkit directory.
      1. SQL Dependencies Required:
        1. SQLite Dependency
        2. MySQL Dependency
      2. The dependency must be located in the craftbukkit plugin directory!
    3. Go to plugins/SimpleShop/ and modify the .settings file to your likings.
    4. Restart server and enjoy!
    Stock
    Show Spoiler
    To activate stock open up the .settings file and locate use-stock=false set it to true.
    Commands:
    Show Spoiler
    /shop check [id] - Show item information
    /shop list (page)
    /shop buy [id]([:amount])
    /shop sell [id]([:amount])
    /shop add [id]:[amount per bundle] [buy] [sell] (stock)
    /shop update [id]:[amount per bundle] [buy] [sell] (stock)
    /shop remove [id]
    /shop reload
    Examples:
    • Getting Started.. We are going to add stone, in bundles of 64 to purchase for 10, and sell for 2.
      • /shop add 1:64 10 2
      • For Stock:
        • /shop add 1:64 10 2 64
    • Lets test it:
      • /shop buy 1
    • Now lets update it.. it was bit expensive and nobody was really gaining money.
      • /shop update 1:64 8 5
      • For Stock:
        • /shop update 1:64 8 5 64
    • Now lets test again:
      • /shop sell 1
    • The end.
    Permission Nodes:
    Show Spoiler
    simpleshop.buy
    simpleshop.buy.gift
    simpleshop.sell
    simpleshop.items.remove
    simpleshop.items.reload
    simpleshop.items.add
    simpleshop.items.update
    Changelog:
    • Version 1.41
      • Rewrote chunks of the coding.
      • Added support for "gifting"
        • /buy [item]( : amount) [who]
    • Version 1.4
      • Fixed connection issues.
      • Fixed plugin hook issues.
      • Added Dependency download support.
      • Default file loading support like in iConomy.
      • Fixed up some CLI issues.
    • Version 1.3
      • Added support for stock
        • Modifies database! Backup before restarting!
      • Fixed some bugs revolving around listing pages.
      • Fixed issues with not being able to set non-sellable / buyable items.
        • Now use -1 for either buy / sell to disable that feature:
        • /shop add 1:64 -1 15
          • Stone is sellable but not purchasable!
    • Version 1.2
      • Commands are now CLI parsed.
        • Causes /shop [id] to become /shop check [id]
      • Shop list is now paginated (Untested)
    • Version 1.1
      • Fully working with selling items.
     
    dojopunk and TonyMcDanza like this.
  2. Offline

    McSpuds

    This plug is working wonderfully for us on NationCraft. Has been since I learned how to pay attention to the details. Once Niji showed me how to "Properly" insert the node into the config'yml file all was good.

    I would suggest very highly in getting notepad+ if you don't have it! I screwed up my config.yml three times before I learned my lesson.

    Here is my config.ymy for an example. (if you paste this with regular notepad... IT WILL NOT WORK) Notepad likes to insert tabs not spaces.... yml hates tabs!

    Do me a favor, if you get this working with a little help... then help me get worldguard going because it has me so stumped I'm ready to toss the computer out the window!

    Code:
    plugin:
        permissions:
            system: default
    groups:
        Default:
            default: true
            info:
                prefix:
                suffix:
                build: true
            inheritance:
            permissions:
                - 'general.spawn'
                - 'iConomy.payment'
                - 'iConomy.access'
                - 'iConomy.rank'
                - 'iConomy.list'
                - 'simpleshop.buy'
                 - 'simpleshop.sell'
        Moderator:
            default: false
            info:
                prefix:
                suffix:
                build: true
            inheritance:
                - Default
            permissions:
                - 'general.time'
                - 'general.teleport'
                - 'general.teleport.here'
                - 'general.player-info'
        Admins:
            default: false
            info:
                prefix:
                suffix:
                build: true
            inheritance:
                - Moderator
            permissions:
                - 'general.spawn'
                - 'general.spawn.set'
                - 'general.exempt.usuage'
                - 'general.exempt.placing'
                - 'iConomy.withdraw'
                - 'iConomy.deposit'
                - 'iConomy.reset'
                - 'simpleshop.remove'
                - 'simpleshop.reload'
                - 'simpleshop.items.add'
                - 'simpleshop.items.update'
                - '*'
    users:
        McSpuds:
            group: Admins
            permissions:
        RandomX45:
            group: Admins
            permissions:
    
     
  3. Offline

    Starrk

    I think I found the problem! I didn't know that we needed to add permissions to Admins, I thought '*' did everything for us. I'll test it out.

    As for WorldGuard, I have the same problem. Whenever I add it to permissions (I make sure to read the details) and I've seem to fix everything wrong, it disables Permissions Plugin and my other plug-ins. I have creeper holes everywhere.

    Thanks though, I'll test the simpleshop out.

    It worked! Thank you, I'll try to get WorldGuard working, I'll let you know.

    I started conducting a list of balanced iConomy but I'm not sure if this is good...

     
  4. Offline

    Xemnas33

    Some of this plugin works for me but I can't get the /shop add, /shop update or /shop reload commands to even appear when I type /shop and they don't work. I've tried re-downloading but nothing =/​
     
  5. Offline

    Starrk

    McSpuds gave a good fix, just look at your permissions config and see what you messed up.
     
  6. Offline

    Xemnas33

    I don't think I have messed anything up =/ I've given moderators all of those permissions and set admins to inherit them.

    Code:
     Moderator:
            default: false
            info:
                prefix: '&d[Moderator] &d'
                suffix: '&d'
            inheritance:
                - Peasant
            permissions:
                - 'general.time'
                - 'general.teleport'
                - 'general.teleport.here'
                - 'general.player-info'
                - 'lwc.protect'
                - 'simpleshop.buy'
                - 'simpleshop.sell'
                - 'simpleshop.items.remove'
                - 'simpleshop.items.reload'
                - 'simpleshop.items.add'
                - 'simpleshop.items.update'
        Admins:
            default: false
            info:
                prefix: '&4[Admin] &4'
                suffix: '&4'
            inheritance:
                - Moderator
                - Peasant
            permissions:
                - '*'
                
     
  7. Offline

    Starrk

    I got WorldGuard to work, what exactly is wrong with your WorldGuard?
     
  8. Offline

    Xemnas33

    Nothing is wrong with my worldguard. It's SimpleShop that I can't get to work. The /shop add and the other commands I listed do not work even after I used the setup above and I also tried putting the permissions in for the admin group but nothing =/
     
  9. Offline

    holynoise

    I have the same problem.
     
  10. Offline

    Dreggor

    Nijiko, Any update on Sign Shops?
     
  11. Offline

    Starrk

    Add these to admin permissions.

     
  12. Offline

    Xemnas33

    Edit: misspelt something it works thanks :)
     
  13. Offline

    benthemeek

    I can confirm that my /shop add problems was due to me expecting as an "OP" to have access to all commands. Once I added my name to the Admins in Permissions I could in fact add stuff once again.
     
  14. Offline

    King of Koopas

    Still no luck. Added permissions with no luck. Same results, I can't add anything.

    Code:
    # Supports "Default" and "GroupUsers"
    plugin:
        permissions:
            system: default
    
    ##
    # Groups can contain inheritance.
    #   To make a group inherit the permissions from another
    #   group simply place the groups name in the "inheritance:"
    #   field seperated by commas.
    #
    #   Example: inheritance: Default,Admins,
    ##
    #   All permissions including the asterisks must be placed in single quotes.
    #   like so:
    #
    #       - 'general.spawn'
    #
    #   Otherwise errors will happen!
    ##
    #   Globalized Permission settings:
    #
    #       If a permission contains periods (.) you can denote a globalized parameter:
    #
    #           - 'general.*'
    #
    #       This will allow you to use all general commands.
    #
    ##
    #
    #   Single Asterisk denotes all commands:
    #
    #       - '*'
    ##
    groups:
        Default:
            default: true
            info:
                prefix:
                suffix:
                build: true
            inheritance:
            permissions:
                - 'general.spawn'
        Moderator:
            default: false
            info:
                prefix:
                suffix:
                build: true
            inheritance:
                - Default
            permissions:
                - 'general.time'
                - 'general.teleport'
                - 'general.teleport.here'
                - 'general.player-info'
                - 'iConomy.withdraw'
                - 'iConomy.deposit'
                - 'iConomy.reset'
                - 'simpleshop.remove'
                - 'simpleshop.reload'
                - 'simpleshop.items.add'
    - 'simpleshop.items.update'
        Admins:
            default: false
            info:
                prefix:
                suffix:
                build: true
            inheritance:
                - Moderator
            permissions:
                - '*'
                - 'iConomy.withdraw'
                - 'iConomy.deposit'
                - 'iConomy.reset'
                - 'simpleshop.remove'
                - 'simpleshop.reload'
                - 'simpleshop.items.add'
                - 'simpleshop.items.update'
    
    ##
    # DarkGrave has control over all commands.
    # sk89q can use /spawn & /time
    ##
    users:
        KingofKoopas:
            group: Admins
            permissions:
            - 'iConomy.withdraw'
            - 'iConomy.deposit'
            - 'iConomy.reset'
            - 'simpleshop.remove'
            - 'simpleshop.reload'
            - 'simpleshop.items.add'
            - 'simpleshop.items.update'
     
    
     
  15. Offline

    Xemnas33

    Do you have anti build installed? If not then i'd take out the build: true without Anti build itt spammed errors for me and disabled permissions. Also the moderator simpleshop.item.update isn't in line with the others.

    Also are you able to set the shop up so you can give the cost to buy 1 of that item but then the player can buy more than 1.

    So say /shop add 17:1 5 3
    Then a player can do /shop buy 17 4
    That would charge the player 20 coins for 4 logs.
    If you are I can't get it to work.
     
  16. Offline

    King of Koopas

    No I can't set up anything. I tried using the example the first page and nothing came up. And I don't have aniy build installed whatever that is
     
  17. Offline

    holynoise

    I am in the Admin-Group and permissions runs quite smoothly, but somehow permissions itself (I think so) changed how the config-file ist formated (and I added some permissions after that, Permissions keeps working after reloading the Plugin / Restarting the Server with this format).

    Code:
    plugin:
      permissions: {system: default}
    groups:
      Default:
        default: true
        info: {prefix: null, suffix: null, build: false}
        inheritance: null
        permissions: [general.spawn]
      Users:
        default: false
        info: {prefix: null, suffix: null, build: true}
        inheritance: null
        permissions: [general.spawn, essentials.me, essentials.warp, essentials.helpop,
          essentials.mail, essentials.mail.send, essentials.home, essentials.sethome,
          essentials.getpos, essentials.whois, essentials.spawn, essentials.kit.Pickel,
          essentials.kit.Schaufel, essentials.kit.Axt, essentials.help, essentials.tpc,
          essentials.motd, essentials.afk, essentials.msg,
          essentials.compass, essentials.list, essentials.tpchere, essentials.accept, iConomy.payment, iConomy.access, iConomy.rank, iConomy.list, simpleshop.buy, simpleshop.sell]
      Moderator:
        default: false
        info: {prefix: null, suffix: null, build: true}
        inheritance: [Users]
        permissions: [general.time, general.teleport, general.teleport.here, general.player-info,
          essentials.tp, essentials.tphere, essentials.kill, essentials.kick, essentials.ban,
          essentials.unban, essentials.banip, essentials.unbanip, essentials.clearinventory,
          essentials.top, essentials.heal]
      Admins:
        default: false
        info: {prefix: null, suffix: null, build: true}
        inheritance: [Moderator]
        permissions: ['*']
    users:
      holynoise: {group: Admins, permissions: null}
    
    Installed Plugins on the Server are
    Permissions
    Essentials
    AntiBuild
    Minecart Mania Core
    Minecart Mania Sign Commands
    Iconomy
    SimpleShop


    //EDIT:
    Okay, I took a look in the Server log and found:
    2011-01-28 19:26:19 [SEVERE] [SimpleShop]: Database connector not found for sqlite: java.lang.ClassNotFoundException: org.sqlite.JDBC

    Maybe I try to switching to mysql later.

    //EDIT2
    Okay, still no luck
    Code:
    2011-01-28 19:38:18 [INFO] Preparing level "world"
    2011-01-28 19:38:18 [INFO] Preparing start region
    2011-01-28 19:38:20 [INFO] [Permissions] version [1.9] (Handler) loaded
    2011-01-28 19:38:20 [INFO] [iConomy] version [2.2] (Aime) loaded
    2011-01-28 19:38:20 [INFO] [AntiBuild] version [1.0] (Reborn) loaded
    2011-01-28 19:38:20 [INFO] [SimpleShop] version [1.1] (Dime) loaded
    2011-01-28 19:38:20 [INFO] Minecart Mania Core version 0.72 is enabled!
    2011-01-28 19:38:20 [INFO] Loaded Essentials b122 by Zenexer, ementalo, Eris, and EggRoll
    2011-01-28 19:38:20 [SEVERE] [SimpleShop]: Database connector not found for mysql: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    2011-01-28 19:38:20 [INFO] [SimpleShop] Creating database.
    2011-01-28 19:38:20 [SEVERE] [SimpleShop]: Database connector not found for mysql: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
    2011-01-28 19:38:20 [INFO] [SimpleShop] Database Created.
    2011-01-28 19:38:20 [INFO] Minecart Mania Sign Commands version 0.11 is enabled!
    2011-01-28 19:38:20 [INFO] Done! For help, type "help" or "?"
     
  18. Offline

    Xemnas33

    And you have the sql-lite file in the main bukkit folder(one with the craftbukkit.jar in)?
     
  19. Offline

    holynoise

    Dang...
    okay, this is awkward... [​IMG]

    Seems like I missed that... Thanks!
     
  20. Offline

    Xemnas33

    Hehe no worries it's the bit in the opening post that says Sqlite dependancy and MySql dependacy
     
  21. Offline

    holynoise

    Yeah, after you wrote the sql-lite file I remembered reading it yesterday evening and put it on the Server.

    Works fine now, thanks [​IMG]
     
  22. Offline

    HaloInverse

    So, I've managed to decompile the .jar, and have started to revise and extend the code, in preparation for implementing a few shop features I'd like to add to my server. The changes so far have been mostly bugfixes, refactoring, extending the user help system, and adding more informative/helpful error messages (mostly player-side).

    However, I'm reluctant to release my modified version without permission, since it's still 80%-90% Nijikokun's code.

    Nijikokun, I would be willing to: (1) Send you my modified source files, from which you would be welcome to incorporate any of my revisions into "official" SimpleShop, and/or (2) release my modified plugin under a different name, credited as being derived from SimpleShop 1.1, or (3) hold off until you're finished developing SimpleShop yourself, or (4) completely abstain from releasing anything derived from your work. Which would you prefer?
     
  23. Offline

    Penorzilla

    So I'm not sure if this was intended, but when you set something to be boughten for 0 it allows people to buy it for free and not disable buying..
     
  24. Offline

    McSpuds

    @Penorzilla Your correct.... If you place a item on the list, it will offer the price listed, even 0.00. What I do if I only want to allow players to "Sell" the shop items is set both buy and sell at the same price... If you want them to buy only, it is easy, set the sell price to zero and they wont even touch that..lol

    @others. Please use Pastebin to post your config files. I can not ID any problems in the code paste.

    If you do that I may be able to help some with iConomy and shops.

    @anybody with a working WorldGuard/permissions please post me you install procedures and Config.yml's in a pastebin please.

    @Nijikokun I would give anything if you could add "Creeper Nerfing or even No Creepers" to your guardian plug. Please help if you can on that.
     
  25. Offline

    DoomBunnyPwn

    Hey great work man, runs like a charm.
     
  26. Offline

    Xemnas33

    Mine works fine but i'm too lazy to go on pastebin so here's what I did:
    Downloaded it extracted it all to my plugins folder, started and stopped the server and edited the config.yml in the World Guard folder to this:
    Code:
    #
    # WorldGuard's configuration file
    #
    # About editing this file:
    # - DO NOT USE TABS. You MUST use spaces or Bukkit will complain. If
    #   you use an editor like Notepad++ (recommended for Windows users), you
    #   must configure it to "replace tabs with spaces." In Notepad++, this can
    #   be changed in Settings > Preferences > Language Menu.
    # - Don't get rid of the indents. They are indented so some entries are
    #   in categories (like "enforce-single-session" is in the "protection"
    #   category.
    # - If you want to check the format of this file before putting it
    #   into WorldGuard, paste it into http://yaml-online-parser.appspot.com/
    #   and see if it gives "ERROR:".
    # - Lines starting with # are commentsand so they are ignored.
    #
    # WARNING:
    # Remember to check the compatibility spreadsheet for WorldGuard to see
    # if any features are currently broken in your version of Bukkit.
    #
    
    summary-on-start: on
    
    protection:
        enforce-single-session: on
        item-durability: on
    
    simulation:
        classic-water: off
        sponge:
            enable: on
            radius: 3
    
    physics:
        no-physics-gravel: off
        no-physics-sand: off
        allow-portal-anywhere: off
        disable-water-damage-blocks: []
    
    ignition:
        block-tnt: off
        block-lighter: off
    
    fire:
        disable-all-fire-spread: on
        disable-fire-spread-blocks: []
        disable-lava-fire-spread: on
        lava-spread-blocks: [01]
    
    mobs:
        block-creeper-explosions: off
        block-creeper-block-damage: on
    
    spawn:
        login-protection: 3
        spawn-protection: 0
        kick-on-death: off
        exact-respawn: off
        teleport-to-home-on-death: off
    
    player-damage:
        disable-fall-damage: on
        disable-lava-damage: off
        disable-fire-damage: on
        disable-drowning-damage: off
        disable-suffocation-damage: off
        disable-contact-damage: off
        teleport-on-suffocation: off
    
    regions:
        enable: on
        wand: 287
        default:
            build: true
            chest-access: false
    
    blacklist:
        logging:
            console:
                enable: on
            database:
                enable: off
                dsn: jdbc:mysql://localhost:3306/minecraft
                user: root
                password: pass
                table: blacklist_events
            file:
                enable: on
                path: worldguard/logs/%Y-%m-%d.log
                open-files: 10
    
    # See http://wiki.sk89q.com/wiki/WorldGuard/Permissions/Bukkit
    permissions:
        users:
            sk89q:
                permissions:
                    - /region
                    - /reloadwg
            Xemnas33:
                permissions:
                    - /region
                    - /reloadwg
     
  27. Offline

    Chumber

    @King of Koopas: You don't have to add anything to group admins since they got all rights anyay with the *
    chances are that you borked it right there since rights have to be added like this:
    - 'name'

    You need to expand your default group though:
    Code:
    - 'simpleshop.buy'
    - 'simpleshop.sell'
    - 'iConomy.payment'
    - 'iConomy.rank'
    - 'iConomy.list'
    And for most of you who get no response at all, you forgot to add yourself to the Admins group in permissions.

    Ah and @Nate about that Excel table, you can easily export it into csv and build sql queries with a simple parser script, drop me a PM if you need help with that. Same goes for sqLite to mySQL conversion although there is no real point in switching (imho) unless you write yourself a webadmin interface ^^
     
  28. Offline

    RustyDagger

    IS this still broken players still not losing items when they sell to the shop? or was that fixed and the version number not changed?
     
  29. Offline

    Redderick

    Is there a way to set a value to items and have the shop set up a dynamic value from the original value set?

    What I mean is, if I wanted cobblestone to be set to a value of 1 then if someone sold a block of 64, they would receive 64 (whatever currency name here)

    also, vice versa on the buying. if they bought 64 if that item it would cost (Price of item)*64.


    If you have to place items in the shop to buy or sell in specific quantities that is fine, just trying to see how dynamic I can set things up and so far quite failing. If I missed an explanation of this previously in the thread, it may be because I didn't understand something said.

    Thanks,
    Redderick
     
  30. Offline

    Xemnas33

    Yeah I would like this too. Annoying having to sell a set value instead of being able to sell any amount. =/

    I would also love to see some sort of suply and demand thing that is toggleable one day. Low demand high supply or in other words lots sold not much bought makes the price go down and vice versa with lots of demand but not much supply.
     
  31. Offline

    Stephen92

    is there a way to make it to where you can only sell something and not buy?
     

Share This Page