Discussion in 'Plugin Releases' started by zolcos, Oct 1, 2011.
DO YOU HAVE TO BUY WITH MONEY???
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?
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?
Assuming you're using sqlite, please send me your database file. Are you getting errors on any other commands?
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?
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
when it shows the internal error, this is what comes up in the log:
org.bukkit.command.CommandException: Unhandled exception executing command 'shop' in plugin CommandShops v4.0.0
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
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
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.
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.
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.
/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)
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.
Welcome. And just found another one. It doesn't recognize the new Stone Brick (98:3)
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.
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
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 email@example.com if you have a solution! (BTW, i'm running craftbukkit 1.2.4-R0.1)
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...
..... Sorry, im kinda noobish but how do i revoke them? of the permission
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
Is there any way to convert localshop shops to commandshop shops ??
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
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.
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.
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.
can't determine anything without the log bro
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)
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
Sorry if i am a Little slow, but is there Any way to fix this?
Separate names with a comma.