Inactive [ECON] GlobalShop v0.6 - A simple global shop provided through commands [1337]

Discussion in 'Inactive/Unsupported Plugins' started by Phate123, Jun 8, 2011.

  1. Offline

    Phate123

    GlobalShop - simple global shop that uses iConomy:
    Version: v0.6

    have a look at the GlobalShop BukkitDev Page: http://dev.bukkit.org/server-mods/globalshop/

    you will need some economy plugin installed. GlobalShop provides support for iConomy 4, 5, & 6+, BOSEconomy 6 & 7, Essentials Economy 2.2.17+, MultiCurrency thx to Nijikokun's Register API. Register is implemented in GlobalShop so you don't need to install it seperately!

    Now supporting SuperPerms. If you don't want to use SuperPerms GlobalShop still supports Yeti's Permissions.

    This shop is used through commands. At moment where are five of it:
    Commands:
    • /price (name|id) -> Shows you the price you must pay to buy name|id
    • /buy (name|id) [amount] -> Buy name|id with optional amount
    • /checksell -> Shows you the money you would get for the item you are holding
    • /sell -> Sells the item you are holding
    • /shop reload -> Reloads the config of GlobalShop
    Permissions
    There are ParentPermissions for SuperPerms: globalshop.trade.* and globalshop.admin.*
    • 'globalshop.trade.buy' -> Allow /buy and /price
    • 'globalshop.trade.sell' -> Allow /sell and /checksell
    • 'globalshop.admin.reload' -> Allow /shop reload
    Features:
    • Shop that can be accessed from everywhere
    • You can add customizable item names
    • Damage/Color can be defined in config. So you can sell for example black_wool
    • Considers the durability of an item to calculate the selling price
    • You can set the sellratio. This defines how much money you get for selling an item. Default is 80%
    • All commands can be renamed to your wish by reconfigurating the aliases in plugin.yml HowTo
    Planned features:
    • Setting up prices with commands
    • Writeout of a HTML-File where all prices can be viewed
    Configuration:
    Sample Config File:
    Code:
    #GlobalShop 0.6 by Phate
    #Configuration File
    
    #Use Yeti's Permissions system?
    useYetiPerm: false
    
    #Here the sale ratio is determined
    buysell: 0.8
    
    #Here the shops Item- and Pricelist is determined
    #This is how the items are defined:
    #- ItemID:ItemName:Amount:Price(:Damage/Color)
    ShopItems:
    - 1:stone:64:10.00
    - 4:cobblestone:64:7.00
    - 278:diamond_pickaxe:1:160.00
    - 35:white_wool:64:14.00:0
    - 35:black_wool:64:16.00:15
    
    Download:
    v0.6 http://www.x-pantion.de/bukkit/GlobalShop0.6.jar

    Source:
    http://publicprojects.x-pantion.de/gitweb.cgi/globalshop.git

    Changelog:
    Version 0.6
    • removed permissions out of command nodes in plugin.yml to avoid "Bukkit is sad ..."
    • Bugfix: non player command handling
    Version 0.6b2
    • Superperms support
    • Changed namespace for implemented Register
    Version 0.6b1
    • Implemented Nijikokun's Register to support more plugins
    • Support for < RB1000
    Version 0.5.2
    • Bugfixing Permissionhandling if no permissions plugin is installed
     
  2. Offline

    gamerslap

    its ok...the problem is an easy fix
     
  3. Offline

    Beybladera

    Hey could you add a part in the plugin that would alow the fluctuation of an items price due to the stock of the item in the virtual global shop?
     
  4. Offline

    gamerslap

    update your prices you mean?so that would be cool to have a config of an auto price updater
     
  5. Offline

    Retricide

    Would it be possible to add multiple Global-Shops, accessible through permission nodes?
    We have different donor ranks and want to give each rank access to a market with more favorable prices.

    Maybe Some node like: 'globalshop.use."shopname"' and that would allow the person to buy and sell to that shop?
    Much appreciated if this is possible.
     
  6. Offline

    gamerslap

    it would bascially be copy and paste in the source code making the classes each a shop and they interact with eachother through what rank that persons variable is set to
     
  7. Offline

    Phate123

    @Retricide
    Yes this should be possible. But at moment I don't have enough spare time to implement such a thing. And if there are features with more need. (Adding items with commands)

    But as gamerslap pointed out, it's mostly copy and paste (I can think of a much cleaner way, but this should work). The source code is in the first post.
    But I have also a quick-and-dirty solution for you:
    You could take the sourcecode, modify the plugin.yml (pluginname and commandnames) and then have a look at the globalshop.java and change the permissions. In that way you could run each of your shops in an own GlobalShop-Plugin instance.

    @Beybladera
    as GlobalShop doesn't take care of items in stock it just has unlimited resources. I don't really understand what you mean?

    Testest v0.5.1 with planes mod. It's working half: you can buy planes but it's not possible to sell them :) that's a bukkit problem, as they don't support the damage of planes. But it should be possible to get that work also.
    View attachment 4223

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

    rexkiller

    hey is it possable to uplad a premade pricelist? i dont have the time to set it all up
     
  9. Offline

    magerags

    i cant sell anything to the server?????
     
  10. Offline

    milkywave1

    Why cant i buy anything???everytime i buy something there will be this [An internal error occured while attempting to perform this command] HELP ME PLS;)
     
  11. Offline

    Marinedalek

    Whenever someone types in /buy or /sell it says mode set to buy/sell
     
  12. Offline

    Phate123

    Hey mageregs, milkywave1, Marinedalek,

    please provide further information, so I can see whats happening:
    - your configfile
    - Which version of craftbukkit do you use?
    - What shows the console?
    - maybe: what other plugins do you have installed?
     
  13. Offline

    DutchxJapie

    Do you have IConomyChestShop?
    if yes you are typing the commands of IConomyChestShop.
    A little guide to change the commands of global shop:


    you can set up the command aliases yourself. Open the GlobalShop.jar in an ArchiveProgram (such as Winrar). Edit the plugin.yml to your needs and put it back in the jar-File.
    Change this lines:


    gs_sell:
    description: Sell item in your hand to GlobalShop
    aliases: sell
    to this lines:


    Code:
    gs_sell:
    description: Sell item in your hand to GlobalShop
    aliases: shopsell

    Can you please add a command like /shop list or /gs list so you can see the items that are selled.

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

    milkywave1

    Heres your further info:

    -CONSOLE-
    -PLUGINS-
    -BUILD-
    928

    -CONFIG FILE-
     
  15. Offline

    Marinedalek

    Thanks for the help!
     
  16. Offline

    skyref

    Nice plugin, I looking for something like this, but with automatic price calcuation.
     
  17. Offline

    Phate123

    For all who have problems with the plugin: Please update to v0.5.2
     
  18. Offline

    DutchxJapie

    how can my people on my server see what the can buy? (or sell)
    i dont see any update...
     
  19. Offline

    Openlanding

    Is anyone else not able to download the file?
     
  20. Offline

    WhosDaMan

    I have a question:

    Are there unlimited of each item in the global shop or do numbers rise when a player sells and numbers lower when a player buys?

    Example:

    There is 10 stone in stock.
    Someone sells 10 stone to the global shop.
    There is now 20 stone in stock.
    Someone buys 20 stone in stock.
    There is now 0 stone in stock.
    Someone else tries to buy stone but cannot because it is out of stock.
     
  21. Offline

    Phate123

    I don't know, why this plugin needs a stock support? It's just more simple without that. I can't imagine how I will show the user the stock? How does the user know how much items are in stock?
    I'm also thinking about how in gerneral, can I give the pricelist to the user? It's not very easy, because the Chatbox isn't very big. It must be more than one page and that is calling after pagination. I don't think this would be very handy. More likely I will support the write out of a full customizable html-file for the website of the server. Or maybe additional to that a XML or JSON interface.

    But if you really want to spent coding time on it, do it. The Source is released. You can do with it what you want. I won't stop you. ;-)
     
  22. Offline

    Magie

    I set buysell: 0.5 and 4:cobblestone:1:4.00
    When I buy it, it coasts 4$ but when I sell it, it gives me only 1$

    Any idea?
     
  23. Offline

    Phate123

    HI magie.

    can you post or upload the config? Are you shure you set up the id 4 only one time? If you have done that, the plugin will only use the first one if no damages are set up.
     
  24. Offline

    Magie

    Code:
    #GlobalShop 0.5 by Phate
    #Configuration File
    
    #Here the sale ratio is determined
    buysell: 0.5
    
    #Here the shops Item- and Pricelist is determined
    #This is how the items are defined:
    #- ItemID:ItemName:Amount:Price(:Damage/Color)
    ShopItems:
    - 1:stone:1:6.00
    - 3:dirt:1:3.00
    - 4:cobblestone:1:4.00
    - 5:wooden_plank:1:4.00
    - 6:sapling:1:3.00
    - 8:water:1:10.00
    - 10:lava:1:16.00
    - 12:sand:1:3.00
    - 13:gravel:1:3.00
    - 14:gold_ore:1:35.00
    - 15:iron_ore:1:20.00
    - 17:wood:1:12.00
    - 18:leaves:10:5.00
    - 20:glass:1:5.00
    - 24:sandstone:1:12.00
    - 31:tall_grass:1:10.00
    - 35:wool:1:5.00
    - 44:slab:1:6.00
    - 87:stone:1:14.00
    - 263:coal:1:12.00
    - 264:diamond:1:80.00
    - 265:iron_ingot:1:25.00
    - 266:gold_ingot:1:40.00
    - 319:raw_porkchop:1:8.00
    - 337:clay:1:5.00
    - 348:lightstone_dust:1:5.00
    - 351:ink_sack:1:2.00:0
    - 351:lapiz_lazuli:1:20.00:4
    - 352:bone:1:4.00
     
  25. Offline

    ats1080

    i have a couple suggestions to make this plugin the best and easiest to use shop around. could you create a directory of what the store has to offer (as a command, such as /shop list)? could you make it so you can buy something, but not be able to sell it, and vise versa (not too important, but im sure some people would like it)? could you make it so you dont have to be holding the item (sell anything in your inventory)? could you make it support the items.db file? and the last one for administrative purposes, could you make a command to add/delete items that are for sale?
     
  26. Offline

    blove213

    i have a promblem anytime i tyoe /buy anything and amount or sell it just switches modes and i dont buy anything the checksell and price work tho how to fix this maybe im putting something in wrong Help?
     
  27. Offline

    Phate123

  28. Offline

    proudpro

    I keep getting this message: An internal error has occured...
    I remove iconomychest shops and it still does it
    Code:
    2011-07-06 20:22:19 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'price' in plugin GlobalShop v0.5.1
        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:298)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:711)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:676)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:669)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:84)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NullPointerException
        at phate.GlobalShop.GlobalShop.checkPerm(GlobalShop.java:89)
        at phate.GlobalShop.GlobalShop.onCommand(GlobalShop.java:227)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
        ... 12 more
    2011-07-06 20:22:25 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'checksell' in plugin GlobalShop v0.5.1
        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:298)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:711)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:676)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:669)
        at net.minecraft.server.Packet3Chat.a(Packet3Chat.java:33)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:226)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:84)
        at net.minecraft.server.NetworkListenThread.a(SourceFile:105)
        at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:451)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:361)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:422)
    Caused by: java.lang.NullPointerException
        at phate.GlobalShop.GlobalShop.checkPerm(GlobalShop.java:89)
        at phate.GlobalShop.GlobalShop.onCommand(GlobalShop.java:116)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:35)
        ... 12 more
     
  29. Offline

    Phate123

    @proudpro
    you don't have the newest version installed. In v0.5.1 was a bug due to permission handling, if no permissions is installed. It's looked just the same es your error. It also says that it is version 0.5.1. Please update.

    @Magie
    Sry somehow I forgot your posting. I just saw it again. I will check your config on my testserver. When I can say more. What I can say now is, that you have two times the string "stone" in your config (id 1 and id 87). That will cause problems if you want to buy with /buy stone .

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

    Pixelzz

    when are you going to update for 953?
     
  31. Offline

    Sygnus

    My question: How do you differentiate between buy and sell prices?
     

Share This Page