Solved Open player inventory gui

Discussion in 'Plugin Development' started by slater96, Aug 10, 2013.

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

    slater96

    Hello, I've tried to open a player's inventory type with this code

    Inventory inv = Bukkit.createInventory(p, InventoryType.PLAYER);
    p.openInventory(inv);

    However it doesn't have the armor slots. Is there a way to have them?
     
  2. Offline

    chasechocolate

    Are you trying to open the inventory of another player?
     
  3. Offline

    slater96

    No I want to open up a fake inventory like when a player opens there inventory with E so that I can set the contents and armor contents as a kit so players can see what each kit looks like. Problem is is there are no armor slots atm.
     
  4. slater96
    I don't think custom inventories can have armor slots, since armor is for mobs (players, zombies, skeletons etc) only. If it had armor slots, then what entity would be wearing the armor pieces? Kind of hard to explain, but should make sense.
     
    slater96 likes this.
Thread Status:
Not open for further replies.

Share This Page