[ECON] CommandShops v4.1.0 - The premier local shop plugin. [1.4.7]

Discussion in 'Plugin Releases' started by zolcos, Oct 1, 2011.

  1. Offline

    mrto

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    DO YOU HAVE TO BUY WITH MONEY???
  2. Offline

    zolcos

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    It sounds like you're asking for the ability to give one shop multiple locations. It also sounds like you're trying to make a global shop across the whole server. Am I right?
    what
  3. Offline

    griffenx

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I installed the plugin and it worked fine for about a day, but then I got back on the server the next day and now basically nothing works. Whenever I try to access a store, I get this error in-game: Browse cancelled due to DB error. and this error message in the console: [WARNING] [CommandShops] Couldn't get shop info list: java.lang.IndexOutOfBoundsException: Index: 1, Size: 0
    Any idea what I did wrong?
  4. Offline

    zolcos

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Assuming you're using sqlite, please send me your database file. Are you getting errors on any other commands?
  5. Offline

    griffenx

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    the it allows me to list the shops, select and create a shop, add and remove items from a shop, but when I try to set the sell or buy price it says "An internal error occurred while attempting to perform this command."
    I could probably just delete my database file and redo the shops (there were only a small handful), but I'm not sure what went wrong and it might just happen again and I'd be back at square one.
    Also, how would you like me to send the database file?
  6. Offline

    zolcos

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    You must get some other errors in the log when you see the "internal error" message ingame. Something about exceptions?
    Post your full server.log with code tags (or use pastebin if it's really large) and you can send the database via any file locker site
  7. Offline

    griffenx

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    when it shows the internal error, this is what comes up in the log:
    [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'shop' in plugin CommandShops v4.0.0
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:42)
    at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:166)
    at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:469)
    at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:906)
    at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:866)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:849)
    at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:33)
    at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
    at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:116)
    at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
    at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:554)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:452)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
    Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.RangeCheck(ArrayList.java:547)
    at java.util.ArrayList.get(ArrayList.java:322)
    at com.iCo6.util.Common.formatted(Common.java:125)
    at com.iCo6.iConomy.format(iConomy.java:504)
    at net.milkbowl.vault.economy.plugins.Economy_iConomy6.format(Economy_iConomy6.java:108)
    at com.aehdev.commandshops.commands.CommandShopSet.shopSetSell(CommandShopSet.java:474)
    at com.aehdev.commandshops.commands.CommandShopSet.shopSetSell(CommandShopSet.java:370)
    at com.aehdev.commandshops.commands.CommandShopSet.process(CommandShopSet.java:83)
    at com.aehdev.commandshops.commands.ShopCommandExecutor.onCommand(ShopCommandExecutor.java:119)
    at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)

    I'm pretty sure there's more, but the hosting service I use truncates really long error messages, and for some reason it also doesn't allow access to the log file.
    and the database file is here: http://www.mediafire.com/?zcidf0f81gonm5k
  8. Offline

    zolcos

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    That makes it look like iconomy's fault. Try updating iCo or using a different econ plugin with the same shop database and see if you still get that error.
  9. Offline

    Mozartripper

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    yes and no/ I don't want a global shop I want to make multiple shops but that they can all share the same price/item list so when I change a price for one shop it reflect on all of them. would make things more simple than changing the price in 5-6 separate shops.

    database layout could look like this.
    id name owner creator x y z x2 y2 z2 world minbalance unlimitedMoney unlimitedStocknotify service_repair service_disenchant Items ID
    itemsid would be the items list this shop should use in the shop_items table.

    This post has been edited 4 times. It was last edited by Mozartripper Mar 21, 2012.
  10. Offline

    Aangiix3

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Screenshots...please? :D
  11. Offline

    Bluehog

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I got a bug for ya. Latest build, downloaded it yesterday

    When using /shop set sell <item> to stop selling an item it messes up with ID with damage values.

    /shop set sell 35 & /shop set sell 35:0 Both stop White Wool from being sold.
    However
    /shop set sell 35:1 does not stop Orange Wool, it instead stops White Wool again.

    Same thing for all IDs with damage values (Pistons, wool dyes, slabs, etc)

    For reference though, /shop buy 35:2 still works properly. And I haven't tested /shop set buy <item>

    EDIT: After a little more testing

    /shop set sell <item> <price> with a damage value on the id acts like you set no price (remove the item and sets damage value to 0)

    Also adding stuff like /shop set sell Jungle Sapling 20 will set normal (oak) saplings to 20, not adding Jungle Sapling. (Jungle Saplings being ID 6:3)

    This post has been edited 4 times. It was last edited by Bluehog Mar 26, 2012.
  12. Offline

    zolcos

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    That makes little sense but I understand what you're asking for now and given that it does sound like a useful feature I will add it if there gets to be more demand. As it stands, though, it would be somewhat difficult and not much payoff for most users

    This plugin is just a bunch of commands and doesn't really make for exciting screenshots. Unless, that is, you want to see some epic shops people have built to go along with the plugin... I think I can find some of those

    Good catch, the regex parsing was falling into the wrong case there. The bug seems to have only affected set buy/sell.
    The issue with Jungle Leaves was a special screwup in the item search for that one item :O
    Will push a fix soon. Tested release will come with the update for the latest batch of new items.
  13. Offline

    Bluehog

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Welcome. And just found another one. It doesn't recognize the new Stone Brick (98:3)
  14. Offline

    Tathar

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Does this plugin work with client mods' new blocks and items? I'd like to recommend this plugin for a Tekkit server, but I need to know it's compatible with everything in the mod pack first.
  15. Offline

    zolcos

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I haven't added any items that new yet. Patience...

    Not a chance. Although, I am open to the idea of an extensions/override system so that mod authors could make their own item lists to dump into CommandShops. Might take a while, though, since I've never dealt with custom blocks before
  16. Offline

    danielcwr

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    OK, I have bpermissions and vault. I have given default rank commandshops.user.* but when I set my rank to default AND deop me I type /shop but it still gives me all the commands like create shop etc... How do i fix this?
    please email me at dcwrowett@gmail.com if you have a solution! (BTW, i'm running craftbukkit 1.2.4-R0.1)
  17. Offline

    zolcos

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Everyone gets manager commands by default and you have to revoke them if you want to restrict those commands. What you probably want is to revoke them for everyone then re-grant to specific user classes, which is how most servers do it.
  18. Offline

    zolcos

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I've released version 4.0.1 which fixes all known problems and requires selections for move and create.
    I plan for this to be the last version before worldguard integration. I've done some research and the good news is it is all definitely possible, as the commands to get region parameters and manage travel messages are accessible from other plugins. It won't be easy, though, since the data isn't really set up to be queried arbitrarily, they structure it so that the info can be retrieved in the way worldguard needs it and that's it. Let's see how it goes...
  19. Offline

    danielcwr

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    ..... Sorry, im kinda noobish but how do i revoke them? of the permission:confused:
  20. Offline

    zolcos

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    in bpermissions you make a "negative node" http://dev.bukkit.org/server-mods/bpermissions/pages/bpermissions-faq/

    For what it's worth, I tried using your database file and it loaded fine, I was able to use and admin the shops and everything, and there were no errors

    This post has been edited 1 time. It was last edited by zolcos Mar 28, 2012.
  21. Offline

    zon

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Is there any way to convert localshop shops to commandshop shops ??
  22. Offline

    zolcos

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Let's talk about regions. The problem we're solving is where people make their shops extend into areas they shouldn't, or make shops in areas you don't want them to (like making a shop in their basement with no prices just for storage so they don't have to build chests).
    Note that you can already restrict shop placement by disallowing access to the create and move commands, having admins create all shops, and transferring ownership to your merchant players, which works perfectly but that setup process is a bit clunky.

    My idea is to allow managers to select an exsting region that will define a shop rather than a custom selection. Doing this would inject the appropriate travel messages into the region. There could then be a config option that when enabled would only allow shops to be placed in this way, and only allow such use of regions owned by the player.
    We could go a step further and, when another config option is set, only allow this use of regions that also have a 'shop' flag, or are a child of a region that has a shop flag (so you could shopify your whole commercial district and not have to add the flags to every individual shop plot).

    Maybe after this is done, you can all have your region plugin developers start automatically creating shops for the owner when the right options are set.

    The main question is whether some other option would be useful because I think this covers all the use cases.
  23. Offline

    zolcos

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    It's the same format, they'll load automatically.
    Unless you were using LocalShops 4 in which case there is no way to do it currently. There's only a couple key differences in the format though so if you want to write a converter it's a simple way to get some fans
    zon likes this.
  24. Offline

    Tathar

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    I'm guessing that adding mod support would just involve changing the item and block name lists from hardcoded to a separate file the server admin can write to. It's important that the file allow different names for different damage values though, since mods tend to use those to condense many blocks and items into the same ID.

    Also a generic form name of each item and block (including vanilla ones) as an alias would be helpful. For example, X250 could mean block ID 250, damage value 0, which corresponds to Industrialcraft's machine block, and X250:1 could mean block ID 250, damage value 1, which corresponds to the iron furnace. If no name exists for an ID/damage value combination, then the plugin could display the generic form until a name is added to the name list file.

    That's just my thoughts on how it could be implemented. I might be making it sound too simple.
  25. Offline

    zolcos

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    The main barrier is that with custom names you must also provide a set of search patterns to match input against. You can see what I mean by going into github and opening Search.java.
    Still doable though, of course.
  26. Offline

    haku_D

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    hi, when i try to do the command "/shop set sell" or "/shop set buy" i get this error: "SetSell cancelled due to DB error" i noticed that you had no FAQ so i hope you can answer me quickly.

    This post has been edited 1 time. It was last edited by haku_D Mar 30, 2012.
  27. Offline

    zolcos

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    can't determine anything without the log bro
  28. Offline

    haku_D

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    i know why it didn't work now, it was because i had no shop to do shop set buy or shop set sell, but when i create a shop i get this error log: 2012-03-30 17:28:03 [WARNING] CommandShops[SQLite] Error at SQL Query: [SQLITE_ERROR] SQL error or missing database (11 values for 10 columns) Query in full: INSERT INTO log ( `datetime`, `user`, `shop`, `action`, `itemid`, `itemdamage`, `amount`, `cost`, `total`,`comment`) VALUES( '2012-03-30 17:28:03', 'Hakko_D', 3, 'create', NULL, NULL, NULL, 100,000000, NULL, 'Location:1083,70,845x1091,77,851')
    2012-03-30 17:28:03 [WARNING] [CommandShops] Couldn't log shop creation: java.sql.SQLException: [SQLITE_ERROR] SQL error or missing database (11 values for 10 columns)
  29. Offline

    zolcos

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Looks like string.format is mangling my numbers by adding commas to them in place of '.' because of "locale" detection. If that's the case I can fix it by telling every call to use a null locale. This is a potentially large and pervasive bug only affecting users outside the U.S.
    I really don't like java sometimes
  30. Offline

    haku_D

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Sorry if i am a Little slow, but is there Any way to fix this?

    This post has been edited 1 time. It was last edited by haku_D Mar 31, 2012.

Share This Page