Virtual Chests: Proof of Concept

Discussion in 'Resources' started by Timberjaw, Feb 10, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Timberjaw

    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:
    1. Multiple users accessing the chest simultaneously
    2. 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
     
    zhuowei likes this.
  2. Offline

    luciddream

    Hey, this is fantastic, thanks!
     
  3. Offline

    WMisiedjan

    This is really a awesome step for a Trade system or something like that!

    I'll help testing this tonight!
     
  4. Offline

    Windows_i7_920

    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 :)
     
  5. Offline

    Fyridor

    I'd test that first statement for you, if I can get my mates to test it out.
     
  6. Offline

    terrornerd

    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.
     
  7. Offline

    matter123

    um just a thought but you never check if the command is /chest
     
  8. Offline

    Timberjaw

  9. Offline

    matter123

    @Timberjaw in your on command you never check if the command is /chest
     
  10. Offline

    Timberjaw

    @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.
     
  11. Offline

    Celtic Minstrel

    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.
     
Thread Status:
Not open for further replies.

Share This Page