OpenInv
Open anyone's inventory or ender chest and modify it in real time! Works with offline players!
Description
This plugin allows you to open any player's inventory or ender chest and interact with it in real time. You can also do it for offline players! This includes access to the armor slots as well as being able to drop items as if you were the player by moving them into the unused slots to the bottom right. Additionally, you can open any chest that is blocked with blocks above it with AnyContainer and open containers silently (no sound or opening animation) with SilentContainer.
Features
- OpenInv: Open anyone's inventory, even if they're offline.
- Read-only mode! Don't grant edit permission.
- Cross-world support! Allow access only from the same world.
- No duplicate slots! Only armor is accessible when opening self (if allowed at all)!
- Drop items as the player! Place items in the dropper slot in the bottom right. Can be disabled via permission!
- Allow any item in armor slots! Configurable via permission.
- OpenEnder: Open anyone's ender chest, even if they're offline.
- Allow access only to own ender chest! Don't grant permission to open others.
- Read-only mode! Don't grant edit permission.
- Cross-world support! Allow access only from the same world.
- SilentContainer: Open containers without displaying an animation or making sound.
- AnyContainer: Open containers, even if blocked by ocelots or blocks.
Installation
To install OpenInv, simply copy the plugin to your plugins folder and restart/reload your server.
Commands
Please see the wiki.
Permissions
Please see the wiki. For assistance upgrading to 5.0.0, check out the migration section.
Other
Source Code hosted on GitHub
Original Bukkit forum thread: http://forums.bukkit.org/threads/15379
-
View User Profile
-
Send Message
Posted Jul 28, 2013@uvbeenzaned
Cool. You're welcome.
-
View User Profile
-
Send Message
Posted Jul 28, 2013@lishid
Just figured out what the problem was the whole time... Apparently my plugin doesn't like sorting InventoryType.PLAYER very well. It wasn't a compatibility issue the whole time. Soooo thanks for helping anyway.
-
View User Profile
-
Send Message
Posted Jul 25, 2013@uvbeenzaned
You'll need to use Reflection to invoke a method on the crafbukkit inventory. Normally you would cast the bukkit "Inventory" object to a craftbukkit "CraftInventory" object, but doing that will make you version dependent, which is why you want to invoke it with reflection.
Once you invoke it with reflection, take the return object and look at its class full name (object.getClass().get something). See if it's from org.bukkit.craftbukkit.something, if it is, then it's an actual player inventory. Otherwise, it could be an OpenInv inventory.
-
View User Profile
-
Send Message
Posted Jul 25, 2013@lishid
Ok thanks for the warnings and stuff about that. I think I get it. With your code, you've basically inherited the Inventory class and then customized for a different view right? I think I get that. Also I need to be using reflection to check and see if your method exists? Is that right? I am just trying to make sure that I have everything straight in my head before I start programming everything in.
-
View User Profile
-
Send Message
Posted Jul 25, 2013@jacklollz2
The option is settable in.... I think it's /plugins/pluginmetrics/config.yml, or something... I forgot the directory name.
@dotapurex1
OpenEnder is made so that server admins can open anyone's enderchest for investigation. I will be coming out with selfender permission later on for your own enderchest access.
-
View User Profile
-
Send Message
Posted Jul 25, 2013@uvbeenzaned
That will be fairly complex... OpenInv hooks directly into CraftBukkit inventories and work on linking the inventories from the same ItemStack[] objects from the internals of CraftBukkit.
If you're using Bukkit API stuff, then you will have much trouble to get the CraftBukkit stuff as it is now version-dependent and all package names will be renamed on every minecraft version.
To check if an inventory is Openinv's, I do this: 1. Get the underlying Craftbukkit inventory: ((CraftInventory) inventory).getInventory(); 2. Check if it's of my own inventory type: if (inv instanceof SpecialPlayerInventory)
This creates trouble though, since i need to support multiple versions of CraftBukkit, which is why I have copies of the same class made for each version of CraftBukkit.
What I suggest you do is to invoke the method .getInventory() using Reflection, then check if the returning object's class name starts with org.bukkit.craftbukkit
-
View User Profile
-
Send Message
Posted Jul 25, 2013@lishid
I downloaded your plugin and imported it into my project because users of my plugin MagicChestare complaining about my plugin wiping the special inventories that your plugin creates. As you've probably figured out, my plugin only sorts the default inventories. Anyway, my question to you is, is there a public method or function that I can access off your plugin to tell if the current inventory that is open is an OpenInv inventory? I would really love to add support for your plugin to work in harmony with mine! Thanks a bunch.
-
View User Profile
-
Send Message
Posted Jul 21, 2013My console is being flooded by the stupid metrics because I have it set to 502.
08:41:11 [INFO] [Metrics] Server returned HTTP response code: 502 for URL: http mcstats.org/report/OpenInv
For god sake, add an option to disable it. It's flooding my log too. Using version 1.5.2 MC, please add a patch for it not 1.6.2.
-
View User Profile
-
Send Message
Posted Jul 17, 2013Also please fix the permission OpenInv.openender, it allows any player to open anyones enderchest, can you make a seperate permission that only allows them to access their enderchest and not other players?
-
View User Profile
-
Send Message
Posted Jul 17, 2013Can you make it so we can do /searchender for specific items? Instead of just the inventory?
-
View User Profile
-
Send Message
Posted Jul 14, 2013@dotapurex1
That's weird... It might be a problem with whatever permissions plugin or your permission setup. OpenInv uses the standard Bukkit permissions hooks so...
-
View User Profile
-
Send Message
Posted Jul 13, 2013Why when i add OpenInv.openender to a group and then give the inheritance of the group with this permission to another it doesn't work?
-
View User Profile
-
Send Message
Posted Jul 10, 2013@lishid
Whoops, no, it wasn't. I was just looking for [SEVERE]'s. I'll go try your 1.6.2 version now. :P
2013-07-09 14:57:54 [INFO] [OpenInv] Enabling OpenInv v2.0.5 2013-07-09 14:57:54 [INFO] [OpenInv] Your version of CraftBukkit is not supported. 2013-07-09 14:57:54 [INFO] [OpenInv] Please look for an updated version of OpenInv. 2013-07-09 14:57:54 [INFO] [OpenInv] Disabling OpenInv v2.0.5
-
View User Profile
-
Send Message
Posted Jul 9, 2013@kermit1970
It's waiting for approval... Some people are not able to see it.
-
View User Profile
-
Send Message
Posted Jul 9, 2013http://dev.bukkit.org/bukkit-plugins/openinv/files/42-open-inv-2-0-6/
this is the link
-
View User Profile
-
Send Message
Posted Jul 9, 2013@dotapurex1
Did you use this version: http://dev.bukkit.org/bukkit-plugins/openinv/?comment=538
-
View User Profile
-
Send Message
Posted Jul 9, 2013@lishid
This plugin is broken for 1.6.2
-
View User Profile
-
Send Message
Posted Jul 9, 2013@LEOcab
Check if the plugin is installed correctly. Do /plugins and see if it's green in the list.
-
View User Profile
-
Send Message
Posted Jul 9, 2013Latest version doesn't work on 1.6.2 nor 1.6.1 for some reason. It doesn't give any errors in console or ingame, it just doesn't work. Neither /openinv or /openender do anything. I am OP and with the following permissions:
OpenInv.openinv: true OpenInv.editinv: true OpenInv.openender: true OpenInv.editender: true OpenInv.crossworld: true
Are there any known incompatibilities with other plugins or something? :/
-
View User Profile
-
Send Message
Posted Jul 9, 2013Or you could just manually type in the URL for the 2.0.6 file :P Thanks for the quick update. One thing - tiny though, with 2.0.6, the file name is Openinv, not OpenInv like 2.0.5. Not very server-breaking, just annoying on linux lol