[ECON] CommandShops v4.2.0 - The premier local shop plugin. [1.5.2]

Discussion in 'Archived: Plugin Releases' started by zolcos, Sep 30, 2011.

  1. Offline

    zolcos

    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.

    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...

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

    danielcwr

    ..... Sorry, im kinda noobish but how do i revoke them? of the permission:confused:
     
  3. Offline

    zolcos

    [quote uid=90597388 name="danielcwr" post=1044585]..... Sorry, im kinda noobish but how do i revoke them? of the permission:confused:[/quote]
    in bpermissions you make a "negative node" http://dev.bukkit.org/server-mods/bpermissions/pages/bpermissions-faq/

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

    <font color="#000000">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.</font>
    <font color="#000000">and the database file is here: <Edit by Moderator: Redacted mediafire url>
    [/quote]

    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
     
    Last edited by a moderator: Nov 12, 2016
  4. Offline

    zon

    Is there any way to convert localshop shops to commandshop shops ??
     
  5. Offline

    zolcos

    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.

    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

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

    Tathar

    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.
     
  7. Offline

    zolcos

    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.
     
  8. Offline

    haku_D

    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.
     
  9. Offline

    zolcos

    can't determine anything without the log bro
     
  10. Offline

    haku_D

    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)
     
  11. Offline

    zolcos

    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
     
  12. Offline

    haku_D

    Sorry if i am a Little slow, but is there Any way to fix this?
     
  13. Offline

    zolcos

    I released 4.0.2 yesterday which should fix this
     
  14. Offline

    haku_D

    THANK YOU SO MUCH!
     
  15. Offline

    XboxAddict77

    I have a problem I can buy and sell to a shop however when i buy i get money (of course) when I buy no money is taken from me . Im using the latest release and Essentialseco
     
  16. Offline

    Inferno

    When people enter shops there is no message 'You have entered Shop' and 'You have left Shop', Was this feature removed?
     
  17. Offline

    Mozartripper

    SHOP ENTER/EXIT MESSAGES ARE GONE UNTIL WORLDGUARD/TOWNY INTEGRATION HAPPENS
    read the first post :p
     
  18. Offline

    zolcos

    It wouldn't give and take money at the same time
    In any case, can't do anything without the log
     
  19. Offline

    Burt_Reynolds

    Is there any way to add custom items from spout like guns plus items.
     
  20. Offline

    zolcos

    Not currently. Although I could add a configurable item list feature but given the amount of effort it would take modders or admins to use it (creating 'fingerprints' for the item name matching system), I don't think many people would.
     
  21. Offline

    zolcos

    New release 4.0.3 fixes the open connections issue for mysql users.
     
  22. Offline

    griffenx

    I have a question. I have the shops set up on my server so that they act as stores in the different towns. Since I'm the creator/owner of the shops (I made them), no money is taken from me when I buy anything. I'd like to be able to buy things from the shops sometimes when I'm just playing normally. If I were to delete my name from the owner section of the shops in the database, would it make it work like that, or would it mess things up?
     
  23. Offline

    zolcos

    Most likely, your economy plugin would give errors which should cause the transaction to not go through.

    The best way to do what you want is put in a fake name and then create a new player file with that name. An 'NPC' if you will. Just make it something ridiculous so someone doesn't actually make a Minecraft account with that name and get rich.

    You may also want to give the shop infinite money.
     
  24. Offline

    axebyte

    any easy way to import the files from sqlite to a Mysql?
    It doesnt auto pull the info from them like it did the flats prior.
     
  25. Offline

    zolcos

    One of the great things about SQL is that there are a lot of third party tools to choose from to manage the data. I recommend "SQLite Administrator" and "MySQL Workbench". With tools like that I'm pretty sure you don't even need to know SQL because they will autogenerate it for you using an 'export' feature.
     
  26. Offline

    axebyte

    zolcos yeah thanks i already have MySql Workbench and it took me a while to get the sqlite to import to it, but i was finally able to get that correct. Thanks.

    This is on the recent 4.0.2 of this plugin. After this happens the server just stops allowing anyone from joining and the server itself just stops replying and i have to do a Stop/restart. Any idea what is behind this error?
     
  27. Offline

    zolcos

    PatPeter strikes again: first SQLibrary made separate connections per query and didn't close them, now it makes 1 connection and saves it forever and never checks if it has expired.
    You can get around this by setting your mysql server's wait_timeout to be longer than the amount of time between your bukkit's regular restarts.
     
  28. Offline

    Tathar

    Did this get implemented? I'm not seeing it on the to-do list anymore.
     
  29. Offline

    zolcos

    It was never officially added as there is not much demand compared to most other features on there
     
  30. Offline

    axebyte

    Got this error, and directly after it, my Iconomy 6 data was wiped .. i hav 150+ very unhappy people.. Any idea what this issue is and why it would of kicked icnomy to delete everything?

    Code:
    2012-05-07 16:47:37 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'shop' in plugin CommandShops v4.0.3
        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:473)
        at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:821)
        at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:781)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:764)
        at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:34)
        at net.minecraft.server.NetworkManager.b(NetworkManager.java:229)
        at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:113)
        at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
        at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:551)
        at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:449)
        at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
    Caused by: java.util.ConcurrentModificationException
        at java.util.LinkedList$ListItr.checkForComodification(LinkedList.java:953)
        at java.util.LinkedList$ListItr.next(LinkedList.java:886)
        at com.iCo6.IO.mini.Mini.read(Mini.java:148)
        at com.iCo6.IO.mini.Mini.read(Mini.java:135)
        at com.iCo6.IO.mini.Mini.update(Mini.java:374)
        at com.iCo6.system.Queried.setBalance(Queried.java:421)
        at com.iCo6.system.Holdings.setBalance(Holdings.java:26)
        at com.iCo6.system.Holdings.math(Holdings.java:103)
        at com.iCo6.system.Holdings.add(Holdings.java:58)
        at net.milkbowl.vault.economy.plugins.Economy_iConomy6.depositPlayer(Economy_iConomy6.java:157)
        at com.aehdev.commandshops.commands.CommandShopSell.shopSell(CommandShopSell.java:440)
        at com.aehdev.commandshops.commands.CommandShopSell.process(CommandShopSell.java:292)
        at com.aehdev.commandshops.commands.ShopCommandExecutor.onCommand(ShopCommandExecutor.java:120)
        at org.bukkit.command.PluginCommand.execute(PluginCommand.java:40)
        ... 12 more
     

Share This Page