Custom Inventories

Discussion in 'Plugin Development' started by AGC-Intra, Jul 22, 2014.

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

    AGC-Intra

    Hello,
    Bukkit dev is huge and so many posts I've spent much time looking for examples and/or tutorials on what I need to do but I can't find exactly what I'm looking for, found some close similar help but was hoping there was some better explanations or examples somewhere.
    So created this thread to tap the KB of experienced bukkit forum users, hope maybe one of you can offer some links to material to help me.

    I've created a locker plugin.
    When a locker is accessed it creates a new Inventory called Locker Inventory.

    Looking for good tutorial or example of the EventHandler of when objects are dropped and/or removed from the custom inventory. Would love to see it done(an example) and ensure I am going about it the right way.

    Also, when I store each Inventory(locker) is it best to do so in a file named by their UUID or playername?


    Anyone replying with info, Thank You!! :)
     
  2. Offline

    CorrieKay

    I have some pretty decent experience in this kinda stuff. What exactly are you trying to do when people interact with the inventory?

    (also, not sure if this is what you need, but i have a writeup of how to do custom inventory saving/loading here)
     
    AGC-Intra likes this.
  3. Offline

    AGC-Intra

    Each 'Locker' is unique to the owner and can be accessed wherever a locker setup is. No matter where you access a locker it is your same locker. (Like a small private chest you can access at any locker area.) Every user can only have one locker and must rent them. So the inventories are private and one each only.

    Perfect! Thank you very much. :)
     
  4. Offline

    CorrieKay


    Yes, this (storing by UUID) would probably be the best way to handle this. Considering name changes are coming, this is the only way to make sure that someone never loses their locker :]
     
    AGC-Intra likes this.
  5. Offline

    AGC-Intra


    That is what I was thinking, thank you very much for your help.
     
  6. Offline

    CorrieKay

    Glad to help out :]

    I've got a very similar system in my plugin, Simply Modular. Its embedded into the multiworld module, so that each world could have one (i call them backpacks), so if you want to reference some code that handles the same kind of stuff, you should check out my repository.
     
    AGC-Intra likes this.
  7. Offline

    AGC-Intra

    Awesome! Thanks again, you rock! :)
     
    CorrieKay likes this.
Thread Status:
Not open for further replies.

Share This Page