ItemFinder
What is it?
ItemFinder is a plugin which basically allows you to scan through all chests, furnaces, hoppers, and other stuff wich can hold items in your world and see if someone contains a specified item. This is really useful if, for example, you had a bad admin who, before getting banned, has hidden some precious stuff in some chests all around the world, and you don't know where.
How to use
- when you first install the plugin, before starting to search for an item, you have to index all inventory holders in all worlds. To do so, you have to type the command
/itemfinder indexand then typeY. Indexing all those chest will take a while (depending on world size, it could also take several minutes); - once indexing is done, you can start searching for your items! Simply type
/itemfinder search <item...>, replacing<item...>with the IDs or the names of the items you want to find. For example, if you want to find all inventory holders containing iron and diamond sworlds, you would have to type/itemfinder search iron_sword diamond_sword. Remember that if you want to search something again, you don't need to re-execute the/itemfinder indexcommand!; - teleport to the locations found and evaluate what to do. If you have ProtocolLib installed, you can teleport to one of them by simply opening the chat and clicking on the desired location.
The plugin has an updater, which basically allows it to update itself when I publish a new version. You can disable it in the config, setting the key autoUpdate to false.
Commands
/itemfinder index: indexes all inventory holders in all worlds;/itemfinder cancel-indexing: cancels inventory holder indexing;/itemfinder search: searches for an item in all indexed inventory holders.
Dependencies
To work, this plugin needs to have PowerNBT installed. Additionally, you can also install ProtocolLib if you want to have the additional teleporting utility discussed before.
Permissions
itemfinder.*: allows the player to use all the ItemFinder commands;itemfinder.itemfinder.*: allows the player to use all the/itemfindercommands;itemfinder.itemfinder.index: allows the player to use the/itemfinder indexcommand;itemfinder.itemfinder.cancelindexing: allows the player to use the/itemfinder cancel-indexingcommand;itemfinder.itemfinder.seach: allows the player to use the/itemfinder searchcommand.
Todo
disable the player to search for an item before inventory holders have been indexed;read region files directly to get all inventory holders;put the indexing code on a separate thread to reduce server lag;- add support for data search;
- make the plugin also scan through all entities, especially minecarfts with furnaces or chests;
- make the plugin also scan through all player inventories;
- make the indexing work with multithreading;
- add the ability to index and search for enchantmets etc..
If you have any suggestions or have found a bug, please tell me!
-
View User Profile
-
Send Message
Posted Aug 1, 2014It's pretty useless if you can't search for all diamond pickaxes which have let's say an enchantment that's over the top... You can just search for plain items...
-
View User Profile
-
Send Message
Posted Apr 24, 2014@Creeperbossya2
Of course not!
Edit: if you look at the description above, you can find everything about permissions and permission nodes ;)
-
View User Profile
-
Send Message
Posted Apr 24, 2014@fungreenfox
Oh, now that I think about it, the confirm message could may be unclear. You have to open the chat and then type
Y(and then, of course, press enter). I'll fix this in the next update, sorry! :)-
View User Profile
-
Send Message
Posted Apr 24, 2014@Creeperbossya2
I dont have access to others server for this. But a normal player with itemfinder.* will experiense the same as i do, at my server.
-
View User Profile
-
Send Message
Posted Apr 23, 2014Does this work if you are not an admin and on other people's server?
-
View User Profile
-
Send Message
Posted Apr 23, 2014@imamo
Yes the NBT is installed. Itemfinder says type Y to continue, but nothing happens.
-
View User Profile
-
Send Message
Posted Apr 23, 2014@Zilacon
I have to use that dependency because of the use of NBTs. In fact, in the Bukkit API you can't access, save, or modify NBTs. I would need to do some reflection and work with NMS to make this work. I already tried to do this (and I didn't get it to work) but since I'm not a professional nor I have that much time to spend on my work, I gave up. For now, PowerNBT is a required dependency, but in the future I may make my own implementation of Minecraft's NBT system.
-
View User Profile
-
Send Message
Posted Apr 23, 2014@imamo
Why would you make your plugin use such a large dependency for such a simple plugin?
250 KB for a single function is kinda ridiculous.
-
View User Profile
-
Send Message
Posted Apr 22, 2014@fungreenfox
Did you install PowerNBT? Because it's a required dependency now. By the way, I just uploaded a new version because the other one got rejected because of the updater. Now everything should be fine, I hope they'll approve it, since it's already the second time it got rejected for the same reason.
-
View User Profile
-
Send Message
Posted Apr 19, 2014It doesnt load atall. Using 179 and itemfinder is an unknown command.
-
View User Profile
-
Send Message
Posted Mar 11, 2014@fungreenfox
I finally updated an new version! Now it is much faster and efficient :D There's still a little glitch, I hope I figure out rapidly how to fix it.
-
View User Profile
-
Send Message
Posted Feb 3, 2014I'll probably have to reflect the whole NMS NBT system to get stuff work, since the PowerNBT API isn't doesn't work well in most recent version of CB when chunk processing. It's not really necessary, but this will make work much easier in the future when I'll add checking for enchantments etc. Point is, this will require some time ;)
-
View User Profile
-
Send Message
Posted Jan 28, 2014if it can help: i am using worldborder, and 10 worlds are max 7000 radius and one is without border, but only little building in this last one, and likely no chests in that one.
Some worlds are 2 years old, some from bukkit 162 and one from 172.
-
View User Profile
-
Send Message
Posted Jan 28, 2014@fungreenfox
Oh this is so frustrating! I tried it a couple of times before uplading it, and I didn't get any problems. Now I tried again with a bigger world save and I get errors... :( Anyway, thank you really for your support! I'll try to fix it asap!
-
View User Profile
-
Send Message
Posted Jan 27, 2014I do not know, if this itemfinder is doing anything, or it stopped due to this error:
2nd edit: (it actualy stops after choosing /if index)
[01:46:37 INFO]: [ItemFinder] Indexing all inventory holders: 0% done.
[01:46:37 WARN]: Exception in thread "Craft Scheduler Thread - 23"
[01:46:37 WARN]: org.apache.commons.lang.UnhandledException: Plugin ItemFinder v2.0 generated an exception while executing task 193825
at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:56)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: Asynchronous entity world add!
at net.minecraft.server.v1_7_R1.World.a(World.java:2468)
at net.minecraft.server.v1_7_R1.Chunk.addEntities(Chunk.java:765)
at net.minecraft.server.v1_7_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:131)
at net.minecraft.server.v1_7_R1.ChunkProviderServer.getChunkAt(ChunkProviderServer.java:88)
at org.bukkit.craftbukkit.v1_7_R1.CraftWorld.getChunkAt(CraftWorld.java:118)
at org.bukkit.craftbukkit.v1_7_R1.CraftWorld.getBlockAt(CraftWorld.java:82)
at mamo.itemFinder.Indexer$1.run(Indexer.java:69)
at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftTask.run(CraftTask.java:58)
at org.bukkit.craftbukkit.v1_7_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
... 3 more
-
View User Profile
-
Send Message
Posted Jan 27, 2014@imamo
I am looking forward to use it Imamo. It will be tested up against 11 worlds.
-
View User Profile
-
Send Message
Posted Jan 27, 2014@fungreenfox
Dude, after replying to your post I finally got back to the plugin! I worked all day, finishing what I started some time ago. And... It's done! ItemFinder v. 2.0! Now it's endless times faster and doesn't cause lag any more. The plugin has only to be approved and then will be avaiable for download. :D
-
View User Profile
-
Send Message
Posted Jan 26, 2014Good luck, ill try next version :)
-
View User Profile
-
Send Message
Posted Jan 26, 2014I changed the last file back to Alpha, as there are still some stupid errors in the permissions and it the inventory holder indexing isn't that "good". If you want do downlad it, click here.
-
View User Profile
-
Send Message
Posted Jan 26, 2014@fungreenfox
I'm already back. I'm trying to rewrite the code to read directly the region files through NMS instead of using Bukkit API, wich loades the chunks to read them (which is slow). The only problem is that I'm really busy in this period and I can't seem to find time to work on the plugin. I'll tell you when I have some updates.