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
- Read-only permissions for OpenInv and OpenEnder! Just don't give the editinv and editender permissions nodes!
- Administrators can modify any user's inventory or ender chest contents as they wish, in real time.
- Access from anywhere! No distance or obstacle limitations.
- Permissions support.
- Player inventories and ender chests of any player can be opened. Even for offline players!
- Using the openinv or openender command without any arguments opens the last accessed player's inventory/ender chest.
- Search all online players for a certain item in their inventory or ender chest.
- Protect players from openinv with exempt permission, and bypass protection with override permission.
- Cross-world openinv protection.
- Self-opening protection.
- Open containers that are blocked by solid blocks or ocelots with the 'AnyContainer' feature.
- Silent opening of containers with no sound or opening animation.
- Drop items as the other player (by putting it in the unused slots in the bottom right)
Installation
To install OpenInv, simply copy the plugin to your plugins folder and restart/reload your server.
Commands
Command | Aliases | Description |
---|---|---|
/openinv <player> | oi, inv, open | Opens a specified player's inventory. |
/openender <player> | oe | Opens a specified player's ender chest |
/searchinv <item> [minAmount] | si | Lists all players that have a certain item in their inventory. |
/searchender <item> [minAmount] | se | Lists all players that have a certain item in their ender chest. |
/searchenchant <[enchantment] [MinLevel]> | searchenchants | Lists all online players with a specific enchantment. |
/anycontainer | ac, anychest | Toggles AnyContainer mode (blocked container bypass) |
/silentcontainer | sc, silent, silentchest |
Toggles SilentContainer mode (open containers silently) |
Permissions (CaSe SeNsItIvE)
Permission Node | Description |
---|---|
OpenInv.openinv | Gives permission to use OpenInv. |
OpenInv.openself | Allows opening the inventory of the command user. |
OpenInv.editinv | Allows editing of inventories. |
OpenInv.openender | Allows opening of ender chests. |
OpenInv.openenderall | Allows opening of ender chests of everybody. Without this permission, someone can only open his own ender chest. |
OpenInv.editender | Allows editing of ender chests. |
OpenInv.search | Gives permission to use searchinv and searchender command. |
OpenInv.searchenchant | Required to use /searchenchant. |
OpenInv.crossworld | Allows cross-world use of openinv. |
OpenInv.exempt | Makes the player's inventory protected (unable to be opened). |
OpenInv.override | Gives permission to open anyone's inventory, even protected ones. |
OpenInv.anychest | Gives permission to open chests that are blocked by a block on top. |
OpenInv.any.default | Causes AnyContainer to be enabled by default. |
OpenInv.silent | Gives permission to open chests in total silence, without animation. |
OpenInv.silent.default | Causes SilentContainer to be enabled by default. |
Other
Source Code hosted on GitHub
Original Bukkit forum thread: http://forums.bukkit.org/threads/15379
@foxwillow
When you log off, your inventory is saved, which means the stuff you throw out will be permanently thrown out until you pickup again. That is unless if you have another plugin that interacts with how inventories work.
something that might be worth looking into...
i don't have any inventory-related plugins besides this one, and players are able to sometimes throw out their inventory, log out and log back in, and pick it up off the ground and still have it in their inventory as well.
if it could be double-checked, that would be great... trying to find the issue but for some reason i can't replicate it myself, but users have done it in front of me several times.
@Strahan201
http://dev.bukkit.org/server-mods/openinv/files/ and download the one for your version
@Strahan201
the latest is 1.3.1 only.
PS, for reference, this is what I'm geting:
01:49:56 [SEVERE] Could not pass event InventoryClickEvent to OpenInv org.bukkit.event.EventException at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:304) at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62) at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:482) at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:467) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:1094) at net.minecraft.server.Packet102WindowClick.handle(SourceFile:28) at net.minecraft.server.NetworkManager.b(NetworkManager.java:234) at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:119) at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:83) at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:579) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:467) at net.minecraft.server.ThreadServerApplication.run(SourceFile:492) Caused by: java.lang.NoClassDefFoundError: lishid/openinv/utils/OpenInvEnderChest at lishid.openinv.OpenInvInventoryListener.onInventoryClick(OpenInvInventoryListener.java:44) at sun.reflect.GeneratedMethodAccessor59.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:302) ... 11 more
@TOOTHPlCK1
Good ideas, will see when I can implement those.
@lishid
There is no way to search all online players enderchests? Also can you add an OpenInv.ender.exempt or some sort of enderchest equivalent of OpenInv.exempt
@TNTUP
I'm not sure how the multi-world inventories are tracked, but I'd suggest you ask the multi-world plugin's authors about it.
I have a suggestion, but idk if its possible, but if we can lookup player's enderchest per world (separated by Multiverse-Inventories)
like now, it loads the player enderchest globally, but idk in what world where the enderchest load.
eg: /oe, openender, enderchest <player> <world>
My server is multiworld, I want to know what players put items in their enderchest in teh world.
@deleted_7554077
Nope, but searching that would require loading all the offline players...
Sweet update bro for the new enderchest and super idea to make read-only mode :D Genius
Same question. Is enderchest searching possible?
Thanks
@lishid Perfect, thanks for adding that feature.
Have you uploaded the one to search others enderchest?
Now default will be read-only, unless someone has the editinv/editender permission nodes.
Added new features:
Enderchest opening with
/openender <Player> (aliases: oe, enderchest)
New Permissions Nodes:
OpenInv.editinv - Allows editing of inventory
OpenInv.openender - Allows /openender command
OpenInv.editender - Allows editing of enderchest
@asofold
Ok, I'll look into it later today.
@Mike724
InventoryClickEvent seems fine on first tests...
I could use the /inv <offline-player> command with SimplyVanish while i did not have the permission to modify it. It did prevent changing the inventory by monitoring the InventoryClickEvent. I can not tell what hack clients can do, that may be subject to asking Bukkit devs. (Edit: by that i mean i open an inventory with OpenInv and Simplyvanish prevents me alterating it, given the right permission and flag setups, being vanished.)
Due to your technique of opening inventories like "real" ones, the events are thrown and respected on CraftBukkit side it seems.
So if you monitor the inventory click events and check if the inventory is one of "yours", and only allow modification if a permission is present (i.e. cancel the event otherwise), it would make the whole thing even more powerful.
@C_hase
Sounds good, though I can't put much time on the plugin for now...
I have an idea for the unused slots, you can put something like a Regeneration Potion, Cooked Porkchop, a piece of glass, a xp bottle, and a ender chest. If you pick up any of those items it will instantly set the item back down, but if you pick up the Regeneration Potion, it will heal who evers inventory it is, Porkchop would feed, glass would clear the inventory, xp bottle would give 1 (or a set amount) of levels, and the ender chest would open up their ender chest.
@lishid
I'm pretty sure essentials has it I think you would just hook into the InventoryClickEvent and deny it. http://jd.bukkit.org/doxygen/d9/d42/classorg_1_1bukkit_1_1event_1_1inventory_1_1InventoryClickEvent.html