Virtual Chests: Proof of Concept Tested with CraftBukkit 271 @luciddream mentioned this idea in #bukkitdev and I thought I'd give it a try. This plugin is a proof of concept for creating virtual chests and displaying them to the user. The code here has not been thoroughly vetted but provides basic functionality in my early tests. The user can trigger display of the chest with the /chest command, place and remove items as desired, and close the chest as normal. Tests Needed: Multiple users accessing the chest simultaneously Inventory hooks triggering when the chest is displayed/closed/etc Feedback: Feel free to take this code and run with it. If you find an issue or come up with an improvement, please submit a pull request to share it with the world. Download: VirtualChest v0.1 [Jar] Source @ GitHub
This is really a awesome step for a Trade system or something like that! I'll help testing this tonight!
After learning how Bukkit works, I'll be developing plugins and I see some very good uses for this. EDIT: Testing has confirmed that works like a chest, exactly as I expected it to. I can see uses in iConomy plugins for this
Wow this could really add a new sort of command system. It could use a players block imput into the chest to genrate events that wouldn't normally happen. Or even build layers of a building fast like a blueprint that the player can see vertically. This could also revolutionize iConomy but others have already mentioned that.
@matter123 Oh. It doesn't need to. The plugin only has 1 command, so you know that any time onCommand is called, that 1 command is the one being executed.
It's interesting that you made it a TileEntity even though you're not linking it to the world in any way, but I guess that's at least partly so you don't have to redefine the various methods that IInventory requires.