Open a PlayerInventory (with ArmorContents)

Discussion in 'Plugin Development' started by Julz_Dev, Aug 10, 2014.

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

    Julz_Dev

    Hello Community,

    I am trying to open a PlayerInventory with the Armor Slots (of another Player), but it didn't work.

    It tried this:

    [target = Player & p = Player]

    p.openInventory(target.getInventory);

    Thanks! :)
     
  2. Offline

    _LB

    It's not that simple - Bukkit isn't going to magically decide how to display the inventory to the user (e.g. how/where to display the armor slots, item on cursor, hotbar, main inv, etc).
     
  3. Offline

    Julz_Dev

    _LB
    Yeah sure, but is it possible?
     
  4. Offline

    _LB

    Yes, many plugins do it. It's just a pain to set up. Why do you want to do it yourself? Find an existing plugin that does it and use that instead ;)
     
  5. Offline

    Julz_Dev

    _LB
    I need this in connection with a new item in my minigame.
    So I can't and I don't want to use another plugin
     
  6. Offline

    _LB

    You can use the other plugin by disabling all ways to access it and just calling its code directly. Or depending on the license you may be able to include the code in your project.
     
Thread Status:
Not open for further replies.

Share This Page