Inactive [ECON] GiantShop v2.0 (BETA) (Forniphilia) - The great new SimpleShop [1.3.1-R2.0]

Discussion in 'Inactive/Unsupported Plugins' started by Giant, Jul 19, 2011.

  1. Offline

    Giant

    GiantShop
    V2.0
    GiantShop 2.0 continues where SimpleShop left off! It is great, fast and most importantly: easy to use! GiantShop is a global shop, wich uses a commands based system to sell and buy items.

    BukkitDev
    GiantShop is now located at BukkitDev!

    This thread is outdated! Please see BukkitDev for updates!

    old stuff (open)

    Features
    • Global shop
    • Item gifting
    • SuperPerms!
    • DataType MaterialData supported including names! Now you can add all your wool colours to your shop!
    • Add items from the console!
    Dependencies

    *Use only 1 of these permission engines at a time!

    **Any SuperPerms plugin may work, but only PermissionsBukkit has been tested!

    Commands (open)

    • /shop - Show GiantShop help page 1
    • /shop [h|help|?] (page) - Show GiantShop help page X
    • /shop [l|list] (page) - Show GiantShop item list page X
    • /shop [c|check] [id([:type])] - Search a single item
    • /shop [s|sell] [id([:type])] [amount] - Sell items back to the shop
    • /shop [b|buy] [id([:type])] [amount] - Buy items from the shop
    • /shop [g|gift] [receiver] [id([:type])] [amount] - Gift an item to player [receiver]
    • /shop add [id([:type])] [amount] [sellFor] [buyFor] - Add an item to the shop, leave sellFor or buyFor as 0 to only sell/buy item
    • /shop update [id([:type])] [amount] [sellFor] [buyFor] - Update an item in the shop, leave sellFor or buyFor as 0 to only sell/buy item
    • /shop remove [id([:type])] - Remove an item from the shop
    • /shop truncate - Erase all items from the shop
    • /shop save - Save current configuration
    • shop export - export current SQL database to CSV*
    • shop import - import data from CSV*
    *These commands are only accessible from the console!


    Permissions (open)

    • giantshop.* - Gives access to all GiantShop permissions
    • giantshop.shop.* - Gives access to the GiantShop payout*
    • giantshop.admin.* - Gives access to all GiantShop admin commands*
    • giantshop - Gives access to simple GiantShop commands as list and help
    • giantshop.shop.check - Gives access to check command
    • giantshop.shop.buy - Grants user ability to buy from the shop
    • giantshop.shop.sell - Grants user ability to sell back to the shop
    • giantshop.shop.gift - Grants user ability to gift
    • giantshop.admin.send - Enables admin to send GiantShop help to user
    • giantshop.admin.add - Enables admin to add items to GiantShop
    • giantshop.admin.update - Enables admin to update items in GiantShop
    • giantshop.admin.remove - Enables admin to remove items from GiantShop
    • giantshop.admin.truncate - Enables admin to remove all items from GiantShop
    • giantshop.admin.save - Enables admin to save the current GiantShop config
    * When using SuperPerms all groups contain 'giantshop' permission


    Example conf (open)

    Code:
    GiantShop:
        Global:
            name: GiantShop #Shop name
            usePermissions: true #Should we use permissions? if not, everyone has access to shop, OP is admin
            permissions:
                permissionEngine: SuperPerms #Permission engine, can be: 'SuperPerms' for bukkit SuperPerms, 'Permissions' for theYetis Permissions, 'PEX' for PermissionsEX
            perPage: 5 #Amount of items to list per page
            Broadcast:
                buy: true #Show a global message that player X just bought a shiny new item
                gift: true #Show a global message that player X just gifted player Y a shiny new item
                sell: false #Show a global message that player X just sold a rusty old item
            govt:
                useGovt: false #Should we use a global user as govt.?
                govtName: Government #Name of the govt. bank account
            free:
                useFree: false #Should we use worlds where shopping is free?
                freeWorlds: #Worlds that can use free shopping
                - world1
        Database:
            type: SQLite #Database to use
            database: minecraft #Database name
            table: GiantShop #Database table name
            prefix: shop_ #Database table prefix, handy for when you have alot of tables in 1 database
            MySQL:
                host: localhost #MySQL host
                port: 3306 #MysQL port
                user: root #MySQL user
                password: none #MySQL password
    


    Download Jar
    items.yml* **
    source - not available as of yet

    *Please use right click -> save as
    ** Should be automatically created by GiantShop.

    Changelog:
    v1.6.2
    • Added ability to buy/sell/gift/check by name!
    • Fixed some return messages not having any colour
    v1.6.1
    • Fixed torches throwing an error when trying to sell
    Older versions (open)

    v1.6
    • Added support for other economy engines!
    v1.5.7
    • Updated items.yml to 1.8.1 (Thanks Jiggy)
    v1.5.6
    • Totally forgot to add support for doubles in importing
    v1.5.5
    • Added support for doubles in pricing
    v1.5.4
    • Fixed past 1am coding bug
    • Bumped version nummer to 1.5.4 in jar after forgetting to do so earlier :rolleyes:
    v1.5.3

    • Added configuration setting to give ops all permissions by default.
    • Renamed config file from GiantShop.yml to config.yml, GiantShop should automatically rename this file.
    v1.5.2

    • Added support for free worlds!
    • Fixed a kind of a big bug where the shop was charging per individual item instead of for the set amount. (meaning: if you would say did /shop add 1 10 10 1 and then /shop buy 1, so buying just 1, you would actually pay 100! xD).
    v1.5.1

    • Added support for "government"
    v1.5

    • Fixed bug where not all help pages were available
    • Added API for future location plugin
    • Added colors to shop messages!
    • Fixed bug where removing caused an internal server error
    • Possibly more, but forgotten....
    v1.4

    • Added import/export from/to CSV command to console!
    v1.3.1

    • Fixed bug where update would update entire list instead of item requested
    • Added some missing materialData thingies
    v1.3

    • Added Support for both Permissions (TheYeti's) and PermissionsEX(PEX)
    • Admin permissions now default to op
    v1.2.1

    • Fixed an accidental mistake where the sale and buy parameter where read in the wrong way around
    v1.2

    • Fixed an issue where players could sell back to the shop, even when this was set to disabled
    v1.1

    • Fixed issue where removing item triggered 2 messages telling item was removed
    • Fixed issue where items with no MaterialData were only sellable when bought from the store
    v1.0

    • initial release



    To do
    • Add colours to GiantShop messages ingame - Implented
    • Look into location bound system - Done
    • Put screenshots in this post for andrewpo :D
    Plugins:

    GiantShopLocation

    Handy stuff:


    There will be NO support given on the bukkit forums! Please file a ticket or a comment on my bukkitDev page!
     
    meiamone likes this.
  2. Offline

    Giant

    That is something I do not plan on supporting, sorry...

    I might add a stock option which might have the ability to modify prices like x1000 when only 1 item left or /1000 when there's 100. But am not sure on that either hehe...
     
  3. Offline

    Raznsun

    Here is the error message I recieved when I tried this command "/shop add 4 1 0 .10"
      • 14:48:59 [WARNING] Unexpected exception while parsing console command
        org.bukkit.command.CommandException: Unhandled exception executing command 'shop' in plugin GiantShop v1.5.4
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
        at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
        at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:344)
        at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:489)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:468)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
        Caused by: java.lang.NumberFormatException: For input string: ".10"
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
        at java.lang.Integer.parseInt(Integer.java:470)
        at java.lang.Integer.valueOf(Integer.java:570)
        at nl.tpre.bukkit.GiantShop.Listener.add(Listener.java:655)
        at nl.tpre.bukkit.GiantShop.GiantShop.onCommand(GiantShop.java:197)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
        ... 6 more
     
  4. Offline

    Giant

    I take it you are using GiantShop v1.5.5?

    Also, what happens when you use "/shop add 4 1 0 0.10" instead of "/shop add 4 1 0 .10"
     
  5. Offline

    meiamone

    No, I think you misunderstood me. I just posted that so you could see how my server item pricing worked. I wasn't actually asking you to implement anything. Sorry if I wasn't clear. I'm happy just having the decimal pricing support added! :D
     
  6. Offline

    Giant

    ah :p
    You wanted to show off your excel skills a bit! now I get it! :D
     
    meiamone likes this.
  7. Offline

    Raznsun

    I think we're actually using v1.5.4, and reading the posts above me, I assume you just added decimal pricing support in 1.5.5 >.< Ruh oh.
     
  8. Offline

    Giant

    Yea it wasn't in 1.5.4 yet hehe...
     
  9. Offline

    Raznsun

    I'll update the plugin, and see if it works.
     
  10. Offline

    Giant

    "Unhandled exception executing command 'shop ' in plugin GiantShop v1.5.4" read this part VERY clear, and tell me, where do you think is the problem?
     
    meiamone likes this.
  11. Offline

    Raznsun

    We live in such a small world.
     
  12. Offline

    Giant

    Ok, I see I am going to have to push a v1.5.6 I totally forgot to give the import decimal support O__o
     
    meiamone likes this.
  13. Offline

    meiamone

    Grr. I'm getting the same error after the update.
    Code:
    >shop add 1 7.04 4.93 64
    15:31:41 [WARNING] Unexpected exception while parsing console command
    org.bukkit.command.CommandException: Unhandled exception executing command 'shop
    ' in plugin GiantShop v1.5.5
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:37)
            at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:12
    9)
            at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:3
    44)
            at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:489)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:468)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NumberFormatException: For input string: "7.04"
            at java.lang.NumberFormatException.forInputString(Unknown Source)
            at java.lang.Integer.parseInt(Unknown Source)
            at java.lang.Integer.valueOf(Unknown Source)
            at nl.tpre.bukkit.GiantShop.Listener.add(Listener.java:652)
            at nl.tpre.bukkit.GiantShop.GiantShop.onCommand(GiantShop.java:197)
            at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
            ... 6 more
     
  14. Offline

    Giant

    you want to sell 7.04?
    You have the amount in the wrong place...
    "/shop add [id([:type])] [amount] [sellFor] [buyFor]" < - valid command
    "/shop add [id([:type])] [sellFor] [buyFor] [amount]" < - yours
     
  15. Offline

    meiamone

    Aw crap! No. Haha. Grr. I put them out of order! Trying to sell itemID 1 (stone) for 7.04, buying for 4.93.
    I do see a problem with my command now. :p Funny thing happened just now...I entered the command right and it added the item correctly!
    So, the importer isn't working?
     
  16. Offline

    Giant

    in 1.5.6 it -SHOULD- be working....
    I totally forgot to update it in 1.5.5 :rolleyes:
     
  17. Offline

    meiamone

    I was reading it from the order in the "data.csv" export file instead of going by the command format.

    Awesome!! Import works and commands work! Oh, ha, the plugin says it's 1.5.5 still.
    Anyway, awesome job! Thanks!!

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 17, 2016
  18. Offline

    Giant

    it does? :S Then I forgot to version bump the build again....

    Edit:
    re-download JAR should now say 1.5.6
     
  19. Offline

    meiamone

    OK, for anyone interested, I have developed an automated spreadsheet for pricing items on a server and preparing them for import into Giant's shop. It requires Microsoft Excel because it's done in VBA. Just change the raw item prices and all the crafted item prices will be updated to reflect. General instructions are included in the archive in Notepad++ format.
     

    Attached Files:

    Giant likes this.
  20. Offline

    Fragstuff

    Hey @ all....

    one question: is it only possible to buy via ID's or also via the itemname??? Because when i try to buy via Itemname GiantShop said that Item [-1] is not selling. But when i type in the ID of the Item it works!!!
     
  21. Offline

    Giant

    Buying via the item name is not not currently supported.
    Sorry if the description is a little confusing, but it currently means that the shop will show the correct names, so if you add lime wool, the shop would say: "lime wool" and not just "wool".

    I am however working on getting the buying by item name working, as this is quite a requested feature!!
     
  22. Offline

    Fragstuff

    Thanks for answer :) :) :)
     
  23. Offline

    Fob_Upset

    @Giant

    Any chance adding item names instead of Item ids?
     
  24. Offline

    Giant

    If you would actually read the couple message above yours, you'd see, that it is a discussed topic, and will also see that I am working on that...
     
  25. Offline

    Fob_Upset

    @Giant

    I changed the price of obbisidian and when i did "/shop import", the plugin gives me this error

    Error message

    Code:
    08.09 09:14:02 [Server] INFO [GiantShop] Importing data from CSV!
    08.09 09:14:02 [Server] INFO [GiantShop] Failed importing.
    08.09 09:14:02 [Server] INFO java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    08.09 09:14:02 [Server] INFO  at java.util.ArrayList.rangeCheck(Unknown Source)
    08.09 09:14:02 [Server] INFO  at java.util.ArrayList.get(Unknown Source)
    08.09 09:14:02 [Server] INFO  at nl.tpre.bukkit.GiantShop.Listener.imports(Listener.java:1031)
    08.09 09:14:02 [Server] INFO  at nl.tpre.bukkit.GiantShop.GiantShop.onCommand(GiantShop.java:213)
    08.09 09:14:02 [Server] INFO  at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
    08.09 09:14:02 [Server] INFO  at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:129)
    08.09 09:14:02 [Server] INFO  at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:344)
    08.09 09:14:02 [Server] INFO  at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:489)
    08.09 09:14:02 [Server] INFO  at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:468)
    08.09 09:14:02 [Server] INFO  at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:363)
    
    08.09 09:14:02 [Server] INFO  at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    
    

    Data.csv file - Be careful very very long list

    Code:
    "id"," dataType"," sellFor"," buyFor"," amount"
    
    1,-1,5,2.5,1
    
    3,-1,1,0.25,1
    
    4,-1,1,0.25,1
    
    5,-1,2.5,1,1
    
    6,-1,3,1.5,1
    
    12,-1,1.75,0.75,1
    
    13,1,3.5,1.75,1
    
    14,2,45,35,1
    
    15,-1,35,25,1
    
    17,-1,8,4,1
    
    18,-1,100,25,1
    
    20,1,20,7.5,1
    
    22,2,180,90,1
    
    23,-1,60,31.75,1
    
    24,1,10,3,1
    
    25,2,40,28,1
    
    27,-1,365,182.5,1
    
    28,-1,52,26,1
    
    29,-1,288,144,1
    
    30,-1,50,25,1
    
    33,-1,38,19,1
    
    35,-1,3,1,1
    
    37,-1,10,4,1
    
    38,-1,10,4,1
    
    39,-1,10,1,1
    
    40,-1,10,1,1
    
    41,-1,495,405,1
    
    42,1,405,315,1
    
    44,1,21,9,1
    
    44,2,7.5,3,1
    
    44,3,3,0.75,1
    
    45,-1,360,80,1
    
    47,-1,51,24,1
    
    48,-1,50,25,1
    
    49,-1,1000,0.01,1
    
    50,-1,7,4,1
    
    53,-1,4,1.5,1
    
    54,-1,20,9,1
    
    58,-1,8,4,1
    
    61,-1,4,2,1
    
    65,-1,4.5,1.75,1
    
    66,-1,16,8,1
    
    67,-1,1.5,0.25,1
    
    69,-1,2,1,1
    
    70,-1,10,5,1
    
    72,-1,5,2,1
    
    76,-1,31,15,1
    
    77,-1,10,5,1
    
    81,1,10,5,1
    
    84,2,78,36,1
    
    85,3,6,3,1
    
    86,-1,10,5,1
    
    87,1,5,1,1
    
    88,2,6,2,1
    
    89,3,60,30,1
    
    91,-1,17,8.5,1
    
    96,-1,8,5.5,1
    
    256,-1,47,36,1
    
    257,-1,136,106,1
    
    258,-1,136,106,1
    
    259,-1,50,40,1
    
    260,-1,2,0.5,1
    
    261,-1,35,15,1
    
    262,-1,0.5,0.2,1
    
    263,-1,25,15,1
    
    265,-1,45,35,1
    
    266,-1,55,45,1
    
    267,-1,91,71,1
    
    272,-1,3,1.5,1
    
    273,-1,2,1,1
    
    274,-1,4,2,1
    
    275,-1,4,2,1
    
    280,-1,1,0.5,1
    
    281,-1,7.5,3,1
    
    282,-1,10,5,1
    
    283,-1,57,28.5,1
    
    284,-1,56,28,1
    
    285,-1,58,29,1
    
    286,-1,58,29,1
    
    287,-1,10,2.5,1
    
    288,-1,3,1.5,1
    
    289,-1,40,25,1
    
    291,-1,2,1,1
    
    292,-1,91,70.5,1
    
    294,-1,91,70.5,1
    
    295,-1,3,0.5,1
    
    296,-1,5,3,1
    
    297,-1,15,5,1
    
    298,-1,15,2.5,1
    
    299,-1,24,4,1
    
    300,-1,21,3.5,1
    
    301,-1,12,2,1
    
    306,-1,225,175,1
    
    307,-1,360,280,1
    
    308,-1,315,245,1
    
    309,-1,180,140,1
    
    314,-1,275,225,1
    
    315,-1,440,360,1
    
    316,-1,385,315,1
    
    317,-1,220,180,1
    
    318,-1,4,2,1
    
    320,-1,20,10,1
    
    321,-1,11,5.5,1
    
    322,-1,3963,1981.5,1
    
    323,-1,13,7,1
    
    324,-1,6,3,1
    
    325,-1,135,105,1
    
    326,-1,150,120,1
    
    328,-1,225,112.5,1
    
    329,-1,10,5,1
    
    330,-1,270,135,1
    
    331,-1,30,20,1
    
    332,-1,1,0.25,1
    
    333,-1,10,5.5,1
    
    334,-1,3,0.5,1
    
    335,-1,150,120,1
    
    336,-1,90,80,1
    
    337,-1,20,10,1
    
    338,-1,4,2,1
    
    339,-1,4,2,1
    
    340,-1,12,6,1
    
    341,-1,250,125,1
    
    344,-1,30,15,1
    
    345,-1,210,105,1
    
    346,-1,25,12.5,1
    
    347,-1,250,125,1
    
    348,-1,15,7.5,1
    
    349,-1,30,15,1
    
    350,-1,35,17.5,1
    
    351,-1,6,3,1
    
    351,1,5,2,1
    
    351,2,11,6,1
    
    351,3,20,15,1
    
    351,4,20,10,1
    
    351,5,25,12,1
    
    351,6,31,16,1
    
    351,7,46,23,1
    
    351,8,26,13,1
    
    351,9,25,12,1
    
    351,10,31,16,1
    
    351,11,5,2,1
    
    351,12,40,20,1
    
    351,13,50,24,1
    
    351,14,10,4,1
    
    351,15,7,3.5,1
    
    352,-1,20,10,1
    
    353,-1,4,2,1
    
    354,-1,353,176.5,1
    
    355,-1,20,10,1
    
    356,-1,107,53.5,1
    
    357,-1,3.75,1.8,1
    
    358,-1,242,121,1
    
    359,-1,90,70,1
    
    2256,-1,2500,1500,1
    
    2257,-1,2500,1500,1
    
    
     
  26. Offline

    Giant

    Interesting! No clue where it fails yet..
    Time to debug that! :D

    Edit:
    Nop works here, be sure to remove those new lines between the lines though!
     
  27. Offline

    MrCamping

    I've found a bug with this plugin. Not sure if there's a way to fix it because i'm not sure how it's created. Also, there might be something else involved, but i'll try to explain it anyway.

    Some of my player managed to get some kind of ghost blocks in their inventory. They can sell the block to the shop, but it stays in their inventory. They can multiply it and fill their inventory with those block. They then sell multiple at the same time and nothing disapear from their inventory. Tehy make millions in minutes.

    As I said, I got no idea how those ghost block were created.

    Not sure if its possible, but maybe adding a check to make sure item is removed from the inventory before giving the money would fix that.
     
  28. Offline

    Giant

    Are you using any other plugins? And with which items does this occur?
     
  29. Offline

    MrCamping

    Yes i'm using like 20+ other plugins.
    I'm pretty sure the "ghost block" have been created by a different plugin. Even MC Vanilla create those ghost block sometimes. That's why it could be nice to add a verification to make sure that the block has been removed from player inventory when he sell it.

    It happened with the dirt block.

    I'm still investigating to try to see how those blocs were created. I'll come back to you with more details.
     
  30. Offline

    Giant

    Thanks, I'll check if I can implement a check if it's removed or not, but not sure on that....
    Also, if you find out how they did it, let me know so I might be able to patch it! :)
     
  31. Offline

    Fob_Upset

    I have 2 bugs to report

    1st bug

    You can sell iron tools, receive the money and keep the iron tool.
    I have tested this on wood, stone, gold and diamond tools and they all work fine apart from iron tools.

    2nd Bug

    Same bug as above but with Mossy Cobble.

    We are running CB: 1060 and GiantShop 1.5.6.

    Please fix this ASAP.
     

Share This Page